mshackman/hack-man-2-engine-development
Armin Friedl a1796c4198 Implement Bot prediction
Calculations of next step of every bot.
2017-11-12 08:28:59 +01:00
..
src/java/io/riddles/hackman2 Implement Bot prediction 2017-11-12 08:28:59 +01:00
test Implement Bot prediction 2017-11-12 08:28:59 +01:00
.gitignore Implement Bot prediction 2017-11-12 08:28:59 +01:00
build.gradle Implement Bot prediction 2017-11-12 08:28:59 +01:00
gradlew Implement Bot prediction 2017-11-12 08:28:59 +01:00
gradlew.bat Implement Bot prediction 2017-11-12 08:28:59 +01:00
LICENSE Implement Bot prediction 2017-11-12 08:28:59 +01:00
match-wrapper-1.3.5.jar Implement Bot prediction 2017-11-12 08:28:59 +01:00
README.md Implement Bot prediction 2017-11-12 08:28:59 +01:00
run_wrapper.sh Implement Bot prediction 2017-11-12 08:28:59 +01:00
settings.gradle Implement Bot prediction 2017-11-12 08:28:59 +01:00
test_mshackman.txt Implement Bot prediction 2017-11-12 08:28:59 +01:00
wrapper-commands.json Implement Bot prediction 2017-11-12 08:28:59 +01:00

Ms. Hack-man game engine

This repository contains the engine for the Booking.com Ms. Hack-man game for the Riddles.io platform.

Setting up

This guide assumes the following software to be installed and globally accessible:

  • Gradle 2.14
  • JVM 1.8.0_91

Opening this project in IntelliJ IDEA

  • Select 'Import Project'
  • Browse to project directory root
  • Select build.gradle
  • Check settings:
    • Use local gradle distribution
    • Gradle home: /usr/share/gradle-2.14
    • Gradle JVM: 1.8
    • Project format: .idea (directory based)

Note: for other IDEs, look at online documentation

Building the engine

Use Gradle to build a .jar of the engine. Go to Tasks -> build -> jar.
The .jar file can be found at build/libs/.

Running

Running is handled by the MatchWrapper. This application handles all communication between the engine and bots and stores the results of the match. To run, firstly edit the wrapper-commands.json file. This should be pretty self-explanatory. Just change the command fields to the right values to run the engine and the bots. In the example, the starterbot is run twice, plus the command for the engine built in the previous step.

To run the MatchWrapper, use the following command (Linux):

java -jar match-wrapper.jar "$(cat wrapper-commands.json)"

Have a look at the MatchWrapper repo for more details about it: https://github.com/riddlesio/match-wrapper

Note: if running on other systems, find how to put the content of wrapper-commands.json as argument when running the match-wrapper.jar