Tugas Besar IF2211 Strategi Algortima
This repository contains the implementation of Entelect 2021 Challenge - Galaxio Bot using Greedy Algorithm.
- Java Version 11
- Apache Maven (Compiler)
- .dotnet version 3.1
NIM | Nama |
---|---|
13521005 | Kelvin Rayhan Alkarim |
13521023 | Kenny Benaya Nathan |
13521024 | Ahmad Nadil |
The bot will use Greedy Algorithm to determine the best strategy
- Create a list of objects in game, which are foods, players, torpedoes, obstacles, supernova
- Then, we determine the best move
- Action that will be determined using a set of unique priorities
- Priorities:
- Food
Determining the closest food and moving to it - Attack
Chasing smaller player, firing torpedoes, teleporting, firing supernova bomb - Defense
Run away from bigger player, use shield - Movement
Avoiding edge of map by moving towards the center
.
│ README.md
│ Dockerfile
│ pom.xml
│
├───src # Source code
│ └──main
│ └──java
│ ├─ Enums
│ │ ├── ObjectTypes.java
│ │ └── PlayerActions.java
│ ├─ Models
│ │ ├── GameObject.java
│ │ ├── GameState.java
│ │ ├── GameStateDto.java
│ │ ├── PlayerAction.java
│ │ ├── Position.java
│ │ └── World.java
│ │
│ ├─ Services
│ │ └──BotService.java
│ └──Main.java
│
│
├───target # bytecode
│ ├─ classes
│ │ ├─ Enums
│ │ │ ├── ObjectTypes.class
│ │ │ └── PlayerActions.class
│ │ ├─ Models
│ │ │ ├── GameObject.class
│ │ │ ├── GameState.class
│ │ │ ├── GameStateDto.class
│ │ │ ├── PlayerAction.class
│ │ │ ├── Position.class
│ │ │ └── World.class
│ │ │
│ │ ├─ Services
│ │ │ └──BotService.class
│ │ └──Main.class
│ │
│ ├─ generated-sources
│ ├─ libs
│ ├─ maven-archiver
│ ├─ maven-status
│ └──JavaBot.jar
│
│
└───doc # Documentation
-
Clone this repo to the
starter-bots
folder in the starter pack by using this link below
git clone https://github.com/IceTeaXXD/Tubes1_beweGanteng.git
- Compile the program using maven in this bot directory
mvn clean package
- Edit the
run.bat
file to run the bot, for example, you can use this command:
java -jar ../starter-bots/Tubes1_beweGanteng/target/JavaBot.jar
-
Execute the
run.bat
' -
Run the visualizer to see watch the match
-
More instructions please head to Galaxio-2021 GitHub Repository