Halite Home

Programmatically run local bots


#1

Hi there,
I've read a lot about people running bots against each other locally using a program. I'm trying to do the same myself, but have no clue how.
I'm using java, can someone help me out?
Kind regards,
Midas


#2

Do you mean the halite executable that you generally run with runGame.sh or runGame.bat? You can find instructions for getting that on the downloads page under the Game Environment heading.

If you want a local match manager, you can check out:

or


#3

I'm a big fan of the local match managers. But, if you just want to see a quick example for running Java bots you can do something like this to run with 4 bots (I save local jar files for each version of my bot):

./halite -d "30 30" "java -jar target/uberjar/MyBot.jar" "java -jar jars/V92.jar" "java -jar jars/V95.jar" "java -jar jars/V77.jar"


#4

What I want to do is write a java program that runs a match between 2 (or more) local bots, records the result, does something, runs a match, records the result, does something, etc...
I'll check out these match managers, but really the only thing I need is being able to do the same as runGame.bat and recording the result. I do already have the halite executable and that works.