All Questions
9 questions
3
votes
5
answers
2k
views
How do I speed up this simulation program
This is a program to solve a differential equation numerically using Euler method. As of now, it is very slow, and I need to run 10000 Monte Carlo simulations.
The differential equation is called ...
5
votes
1
answer
129
views
The python code simulates an environment of a disease and calculates how many people get infected
The python code simulates an environment of an X number of persons with an Y number of places they can go to, puts the persons randomly in the places and calculates how many persons get infected, die ...
2
votes
0
answers
67
views
How can I shorten the runtime of my simulation?
Before you read the code below, note the following explanation:
I have three classes: Driver, Vehicle, and ...
3
votes
0
answers
82
views
Monte Carlo Simulation of a Markov Process
A 1D binary string has the following dynamics
$$1100 \to 1010,\quad 1101\to 1011$$
each with rate \$p<1\$. That is if we see \$110\$ in the string, then we change to \$101\$ with probability \$p\$....
13
votes
1
answer
342
views
Population dynamic simulation on biological information maintenance 2
This question is the follow-up to this previous question.
Background
Using this simulation I investigate a system in which enzymes proliferate in cells. During the replications of enzymes, ...
9
votes
1
answer
210
views
Population dynamic simulation on biological information maintenance
Background
Using this simulation I investigate a system in which enzymes proliferate in cells. During the replications of enzymes, parasites can come to be due to mutation. They can drive the system ...
1
vote
1
answer
691
views
DM::OJ Slot Machines challenge in Python 3
I have written a solution to the Slot Machines challenge on DM::OJ:
Martha takes a jar of quarters to the casino with the intention of becoming rich. She plays three machines in turn. Unknown to her,...
5
votes
2
answers
636
views
Chess Simulation
Part of the program I wrote simulates a Chess game choosing random moves for each player until it's a draw or win for either player. It takes 3 seconds to complete 1 simulation and since it trains ...
2
votes
1
answer
318
views
Monty Hall simulator in Python 3.x
I've been working on Python for the past few weeks trying to get my head around it's syntax/naming conventions/style/etc. I decided to make a monty hall sim to see how it looks in python. For those ...