9. blackjack simulation python

broken image

StaticStrategy classes all use a common mechanism for making decisions about actions to take on a given hand (e.g.

broken image

Descendents of BaseStaticStrategy can implement the other required methods of BaseStrategy however they like.BaseStaticStrategy loads CSVs for static decision making into Pandas DataFrames.

broken image

Currently, there are two flavors of child Strategy classes: ImplementationĪll strategies must inherit from BaseStrategy, which is an abstract base class that lays out the methods that each Strategy must implement to make in-game decisions. They can be found (and added!) in the blackjack/strategies/ directory. Note that there's even a progress bar while multiprocessing game simulations! StrategiesĪ Strategy is responsible for making in-game decisions. Number of game subprocesses to run simultaneously

broken image

This script exposes simulation configuration through several optional command line arguments: Flag

broken image