more variation, quicker runtime
This commit is contained in:
parent
37375b2fac
commit
38b1d28ecd
9
Makefile
9
Makefile
@ -15,4 +15,11 @@ lint:
|
|||||||
test: # TODO: replace with real tests
|
test: # TODO: replace with real tests
|
||||||
python app.py && python strategy.py
|
python app.py && python strategy.py
|
||||||
|
|
||||||
.PHONY: build publish clean lint test
|
serve:
|
||||||
|
python -m http.server 1337
|
||||||
|
|
||||||
|
demo:
|
||||||
|
scp -P 10044 index.html git@mlden.com:/data/f/play.html
|
||||||
|
@echo "visit http://clfx.cc/play.html"
|
||||||
|
|
||||||
|
.PHONY: build publish clean lint test
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<section class="pyscript">
|
<section class="pyscript">
|
||||||
<div class="font-mono">Simulating Games: <label id="outputDiv"></label></div>
|
<div class="font-mono">Simulating 100 Games for 500 Players: <label id="outputDiv"></label></div>
|
||||||
<div id="outputDiv2" class="font-mono"></div>
|
<div id="outputDiv2" class="font-mono"></div>
|
||||||
<div id="outputDiv3" class="font-mono"></div>
|
<div id="outputDiv3" class="font-mono"></div>
|
||||||
<py-config>
|
<py-config>
|
||||||
@ -36,7 +36,12 @@
|
|||||||
<py-script>
|
<py-script>
|
||||||
from pyroulette import *
|
from pyroulette import *
|
||||||
# seed(59)
|
# seed(59)
|
||||||
players = generate_players(num_players=1000, min_num_games=20, total_budget=100)
|
from random import randint
|
||||||
|
players = []
|
||||||
|
for _ in range(1, 20):
|
||||||
|
min_games = randint(1, 100)
|
||||||
|
players.extend(generate_players(num_players=25, min_num_games=min_games, total_budget=100))
|
||||||
|
|
||||||
players = play_roulette(players, games=100)
|
players = play_roulette(players, games=100)
|
||||||
|
|
||||||
for p in sorted(players, reverse=True):
|
for p in sorted(players, reverse=True):
|
||||||
|
Loading…
Reference in New Issue
Block a user