(also as an efficient way to procrastinate studying for my calculus test)
You can implement your own strategy using the Strategy
struct that has the decide
function which returns either Decision::Share
or Decision::Steal
.
In the factors.rs
there are constants for # of rounds played, # of total entities per strategy pool, and how points are distributed.
After two pools go against each other, the score
function is called on each strategy to change how each entity should behave based on how well it did last round
Implemented in one afternoon so most of the code is unoptimized and very ugly unfortunately.
All thanks to the textplots
crate and owo-colors
for beautiful teminal graphs & colors
Red depicts "steal", green depicts "share". Anything in between means that multiple entities (of the same pool) have chosen a different value
Licensed under
- MIT license (LICENSE or http://opensource.org/licenses/MIT)