Skip to content
moreda-aPublic

About

Sharif AI Challenge

Resources

Stars

1 star

Watchers

2 watching

Forks

Latest commit

 

History

31 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

AIC2019 - Sharif AI Challenge Bot

This is our team's (Team DOS) bot for the 2019 Sharif AI Challenge, written in Java. It ranked first on the competition leaderboard.

The game

This is a turn-based strategy game where two teams of four heroes compete on a grid map. The four hero classes are Blaster, Sentry, Healer and Guardian. Every turn has three phases:

  1. Pick: choose the heroes for the team.
  2. Move: move heroes across the map toward the objective zone.
  3. Action: use abilities (attack, heal, dodge, fortify) against the other team.

The full rules are in AIC19/other/GameDesignDoc_V1.4.pdf.

Our approach

All of our strategy code is in AIC19/src/code/, about 4,400 lines. The rest of src/ is the client the organizers provided.

  • Manage.java: the entry point. It sends each phase of the turn to the right handler.
  • PickHandler.java: chooses a team composition based on the map. It includes preset line-ups such as 4 Healers, 4 Guardians, 2 Blasters + 2 Sentries, and 1 Blaster + 3 Sentries.
  • MovementHandler.java and Nav.java: move the heroes. They use BFS pathfinding to the objective zone and other targets, and plan the best move for each turn.
  • ActionHandler.java: chooses abilities and targets each turn.
  • Blaster.java, Sentry.java, Healer.java, Guardian.java: the logic specific to each hero class, built on a shared base in Ahero.java.
  • Util.java and FastMath.java: helpers for distances, line of sight and fast math.

Running

  1. Import AIC19 into Eclipse or IntelliJ as a Java project, and add gson-2.3.1.jar to the classpath.
  2. Start the game server:
   cd AIC19/other
   java -jar server.jar
  1. Run client.Main to connect the bot. The maps used in the practice and qualifier rounds are in AIC19/other/Maps/.

Tech

  • Java
  • Gson
  • JSON over sockets (from the provided client)

About

Sharif AI Challenge

Resources

Stars

1 star

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages