This is the C# agent Replit template for the
WALTER GROUP Hackathon: Sustainable Logistics which you can use to get started quickly. Click on the green Use Template
button!
All questions about the simulation and its rules are answered under Simulation.
- Replit account - Create a new Replit account here
- Open the file Logistics.Hackathon/Program.cs
- The line
app.MapPost("/decide", async (DecideRequest request) =>
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. You can use HackathonMap to get the full map with all the information of the locations on the map.
- Just click on the green
> Run
button at the top of the Replit website.
- Open the file Logistics.Hackathon.Tests/Tests.cs
- This is an integration test which will start your agent and will call the
decide
method with the contents of file Test/Tests/Resources/sample_decide_0.json - You can always change the test and debug your script.
- Also checkout the other sample requests provided.
- To run the tests go to the left side panel in Replit, look for the "Shell" entry and click on it. A new shell tab will open and there execute the following command:
dotnet test
Sure, check out our API documentation and also thoroughly read our Simulation documentation.