dannyhammer / TwoPlayerGames

Undergraduate research into the mechanics of simple two-player games.
3 stars 2 forks source link

Investigate how to generalize the generate_population() function #91

Closed dannyhammer closed 3 years ago

dannyhammer commented 3 years ago

Currently, the generate_population() function is hardcoded for the graph coloring game. The concept behind this function is simple: Given a game, generate a population of n players with random unique strategies.

This seems possible to generalize. As of now, it is hardcoded to accept the number of vertices and colors for a specific graph, and generates random orderings from there.

Possible solution: Implement a RandomInitStrategy for each game. This RandomInitStrategy randomly generates a valid strategy for the game being played, based on the ruleset of the game, upon calling its constructor (initializing it).

Unsure whether this will work 100% of the time.