This repository contains an interface for interacting with the game and an implementation of behavioral clonning agent.
HaxBall is a realtime multiplayer game that plays like a mix between football and air-hockey, and it's a real blast (official about).
LINUX ONLY.
- Add the following line to your hosts file (
c:\windows\system32\drivers\etc\hosts
on windows,/etc/hosts
on linux)
127.0.0.1 inter.haxball.com
- Start the server
python run_server.py
-
Edit
run_bot.py
script to instantiate your agent (an example is provided). -
Start interaction between the agent and the server. The server allows multiple connections, thus you should provide your connection channel (any integer you like, defaults to 0).
python run_bot.py --channel-id=0
- Open
inter.haxball.com:8080/#channel_id
in your browser. This is the original game with slight modifications to allow sending states and accepting the inputs from the bot.
- Run raw replays converter. It will preprocess raw replays, put them into a separate folder, and create a file with nickname mapping (nickname -> all replays).
python run_converter.py --path=replays/
- Use utilities provided in
replay.py
to parse converted replays.