Chris's AI Tic-Tac-Toe Game
Unbeatable tic tac toe game built with go wasm and react.
Check it out here!
Go version 1.11 gave us an experimental version of WebAssembly support. Let's see how it handles computationally intensive tasks in a bigger project.
Goals of this project
- Explore Go WebAssembly
- Build a deeper understanding of the MiniMax Algorithm
- Explore mixing Go WebAssembly in React.js
Unfortunately, WebAssembly for Go (in version 1.11) has a long ways to go.
These were the some of pain points I encountered:
- Large Go files take a long time to parse on the front end. Hence long startup times.
- Performance was underwhelming, grid sizes above 3x3 would crash the browser.
- Performance in the algorithm itslf could be improved if Go's structs had more power.
Again, this is an experimental version of WebAssembly. This is nowhere what Go can/will be in the browser. I'm quite hopeful that in time, Go can find its place among Rust and C in the WASM world.