This is the Java agent template repository for the
WALTER GROUP Hackathon: Sustainable Logistics which you can use to get started quickly.
For a detailed explanation of how to make a copy of this repository and get it into the competition build system, please visit Agent template repositories and competition build system. All questions about the simulation and its rules are answered under Simulation.
- IDE - We strongly advise you to use an IDE which will help you to edit, compile and run Java code. Our recommendation is IntelliJ IDEA, which you can download for free at: https://www.jetbrains.com/idea/download
- JDK 17 - You will need a distribution of JDK 17 on your machine. Our recommendation is the Adoptium project, which you can download for free at: https://adoptium.net/
- Open the project in your favorite IDE and browse to src/main/java/com/hackathon/truckagent/TruckAgentController.java
- The method
decide
will always be called by the simulation when the next decision is needed from your truck agent. The argument of this method contains all the information you need to decide for the next move. Just return an instance of DecideRequest and the simulation will take over again.
- Open the project in your favorite IDE and browse to src/test/java/com/hackathon/truckagent/TruckAgentControllerTests.java
- This is an integration test which will start your agent and will call the
decide
method with the contents of file src/test/resources/sample_decide_0.json - You can always change the test and debug your script.
- Also checkout the other sample requests provided.
./gradlew clean bootRun
will start the truck agent, which will then service requests on port 8080../gradlew clean test
will execute all the tests in the project.
Sure, check out our API documentation and also thoroughly read our Simulation documentation.