Closed alexdriedger closed 2 years ago
Yes, that's a great idea. It's been on my list for a couple days to add seeding for reproducibility. I won't have time in the next week to add this, so if you or anyone else want to get a jump on it that would be great.
This should be added to instantiation of all objects and to the Class.state and Class.from_state methods.
Ok, great to hear that is part of the plan
This has been address in PR #9 by @clsandoval and further integrated into the nominal framework in recent commits.
Closing until further discussion around methods/implementations for random seeding arise!
It would be great if shops could take a seed. This would be useful when comparing the performance of two different AI implementations. Currently each AI would get a random shop and so there is a bit more noise if one AI implementation did better than the other because it got luckier on the shops.
https://github.com/manny405/sapai/blob/ec25fe79183ff983e180bf3ac38cc251b9b5bef7/sapai/shop.py#L93
As a side note, battles could be seeded as well (for random actions like mosquito, crocodile, blowfish, etc.), but I don't really see a use for that at the moment.