Astroficial Intelligence is a hexagonal grid based AI game. Please read Hexagonal Grids to understand how such a grid works. This game is inspired by the Skyport Hackathon game which I played years ago. The implementation is from scratch however, and the game logic and rules are different.
The logic of the game is implemented as a really simple Clojure HTTP and websocket server. The graphics and UI of the game is implemented as a web client using React and Three.js Fiber. Players can implement their AI using any programming language that supports running an HTTP server.
To run a prod version of the game server you need Docker:
# Get the latest image of the game server and UI
docker pull ghcr.io/go-fjords/astroficial-intelligence:latest
# Run the server with docker
docker run -p 8080:8080 ghcr.io/go-fjords/astroficial-intelligence:latest
See detailed instructions on how to play the game in playing.md.
Astroficial Intelligence is implemented as a Clojure HTTP server and a React web client.
The server is implemented in the server
directory and the client in the frontend
directory.
Some files are located in the root directory.
The frontend is developed using the Vite tool. You need Node.js and npm.
npm install
npm run dev
This should run a dev server that you can access at localhost:3000.
The backend is developed using the Clojure Tools Deps. You should install Clojure.
Then start the server with Cider's jack-in (in Emacs and VSCode Calva) or something similar in other editor.
The easiest way to build for production is using Docker:
# Build the image
docker build -t ghcr.io/go-fjords/astroficial-intelligence:latest .
# Push image to GitHub container registry
docker push ghcr.io/go-fjords/astroficial-intelligence:latest