A bunch of bad chess bots that you can actually beat for once!
- Written in Go
- Compiled to WebAssembly
- Inspired by this awesome video
- Playable in the browser
Bot | Strategy |
---|---|
Random | Plays random moves |
Same Color | Plays moves to the same color squares as its pieces |
Opposite Color | Plays moves to the opposite color square |
Huddle | Attempts to put its pieces as close as possible to its own king |
Swarm | Attempts to put its pieces as close as possible to the opposing king |
Centrist | Prefers placing pieces in the center |
This project requires TinyGo to be installed.
tinygo build -o ./docs/bots.wasm -target wasm ./
Opening the index.html
on its own will not work since the proper Content-Type
for bots.wasm
will not be served. Use this command from the root to run a server properly serving bots.wasm
go run ./test-server/main.go