https://github.com/evertras/play-nine-bot
https://github.com/evertras/play-nine-bot
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/evertras/play-nine-bot
- Owner: Evertras
- Created: 2025-08-02T22:29:14.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-03T00:39:28.000Z (10 months ago)
- Last Synced: 2025-08-03T01:08:45.992Z (10 months ago)
- Language: Go
- Size: 20.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Play Nine Bot
Plays [Play Nine](https://playnine.com/) with different strategies to figure out
how to win.
[Instructions
here](https://cdn.shopify.com/s/files/1/0503/3010/8062/files/Single_Page_Instructions_english.pdf?v=1695245685)
## Player turn decisions
A player strategy must make the following decisions:
First, draw or take from discard?
If draw, then decide:
- Replace either a face down or face up card on their board
- Discard the drawn card and flip up a facedown card
- OR, if there is only one facedown card, optionally skip the turn
If take from discard:
- Replace either a face down or face up card on their board
## Known tradeoff decisions
There are a bunch of tests in here that are technically flakey because they're
checking for randomness in seeds that change on each run. I'm being a little
lazy about passing custom seeds around and priming tests better that way.
## Random fun findings
The best threshold for replacing a face up card seems to be around 6. This may
change depending on game state in the future, untested.