https://github.com/natemcintosh/digitparty
Engines that play [Digit Party](https://digit.party/)
https://github.com/natemcintosh/digitparty
julia strategy
Last synced: over 1 year ago
JSON representation
Engines that play [Digit Party](https://digit.party/)
- Host: GitHub
- URL: https://github.com/natemcintosh/digitparty
- Owner: natemcintosh
- Created: 2023-05-13T19:03:11.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-18T23:33:39.000Z (about 3 years ago)
- Last Synced: 2025-01-28T16:49:34.480Z (over 1 year ago)
- Topics: julia, strategy
- Language: Julia
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DigitParty
A copy of [Digit Party](https://digit.party/) that can be programatically played. It can also be manually played, but it's a lot easier to just play on the site. The intent here is to have fun making various engines that play the game, and compare the performance.
If you create an engine, create a new file in `src/` with the name of the engine. Then export
- Your engine, e.g. `export MyEngine`. Make sure `MyEngine <: AbstractEngine`.
- The following method: `pick_next_spot(g::Game, e::MyEngine)::CartesianIndex{2}`
To run it:
```julia
g = Game()
score = play!(g, MyEngine())
pct_max = get_pct_of_max(g)
```
to run a single game with your engine; your score is returned. See [`examples/naive1.jl`](https://github.com/natemcintosh/DigitParty/blob/main/examples/naive1.jl) for a runnable example.