Open bcollazo opened 2 years ago
Shouldn't this be two arguments? as in Action(Player, Action.Trade, (GiveFreqdeck, ReceiveFreqdeck))
. Any reason why you decided to concatenate them?
Ahh, that makes sense. I think I am mixing the end-goal with the current state of things. I think at the current state of things your suggestion makes sense.
However, more and more it seems we want to keep de-adopting Python high-level objects (including enums) in favor of more primitive data types because of performance. Particularly, this action might actually become something like:
(1,8,2,0,0,0,0,0,0,1,0,0)
in the future, where 1 means Blue, 8 means Maritime Trade, and such. That should make .copy()
methods of the state much faster. Ideally, the complete state is just a vector we can quickly copy and edit by convention (i.e. index 5 is number of houses for second player, ...); for speed.
Right now trade actions look like:
Seems better to encode these as a union of two "freqdecks". This will make it more vector-friendl, potentially faster, and more interoperable with the rest of the code.