Compatibility
- 1.0.05.35.25.15.04.2
- master5.35.25.15.04.2
- 1.0.0iOSmacOS(Intel)macOS(ARM)LinuxtvOSwatchOS
- masteriOSmacOS(Intel)macOS(ARM)LinuxtvOSwatchOS
An AI developed to play the Hive board game.
An AI developed to play the Hive board game.
There are 4 main components which make up the HiveMind AI. This repository contains the main AI logic.
Client (Swift)
Server (Ruby on Rails)
Engine (Swift)
HiveMind (Swift)
The HiveMind uses a WebSocket for communication. By default, it listens on ws://localhost:8080
, but you can change the port by providing an alternative through the command line arguments, described below.
To interact with the HiveMind, you can provide various commands over the WebSocket, which it will reply to in turn. The available commands are:
[new, n] <IsFirst> <ExplorationTime>
IsFirst
is a Bool
which indicates if the HiveMind will play first.ExplorationTime
is a Double
which specifies the maximum amount of time the HiveMind can explore a state.[move, m] <Movement>
HiveEngine.Movement
(encoded as JSON) and update the HiveMind's internal state. This is how opponent's moves are received[play, p]
ExplorationTime
[quit]
[exit]
--port <Int>
, -p <Int>
: Specify the port which the HiveMind should listen onswift build -Xswiftc "-target" -Xswiftc "x86_64-apple-macosx10.13"
swift build -c release -Xswiftc "-target" -Xswiftc "x86_64-apple-macosx10.13"
.build/debug/HiveMind
or .build/release/HiveMind
brew install swiftlint
swiftlint
from the root of the repository.