Visual impression
Colors
- First team has red bots, second has blue bots
- Bots with full HP has a green bar otherwise black bar(If you have extra time, you can modify the source code and replace this bar with a progress bar)
- Domination point will be in dark red, dark blue or gray.(depending on which team has captured this point, gray if not captured)
- Respawn point will have a green background and a red, blue or black border.(depending on which team has captured this point, black if not captured)
- All walls are black.
Setup & Run
- Use “File-->Import…-->General-->Existing Projects into Workspace” to load the project into Eclipse
- Use the main() method in the java file: /DominationGame/src/edu/lu/DominationGame/execute.java as entry point
-
Setup the “Run configuration” of execute.java
- Add program arguments as follows:
- rungame maps/map1D.txt maps/map1nav.txt (number of bots you want on a team) (total number of points you want the round to be) (team1's full name) (team2's full name)
- Example:rungame maps/map1D.txt maps/map1nav.txt 3 50000 BasicTeam BasicTeam
- Add “-Xmx512m” to VM arguments.
- Add program arguments as follows:
Score
- The only way to get points is by holding Dom points.
- Scores are updated every five game turns. Five game turns == one big turn.
- A team will get one point for each big turn if one Dom point is held for more than 5 big turns (get first point at the 6th big turn).
- A team cannot lost points for any other reason.
HP & Fight
- Every bot has 10 Hp
- Bots fight only when them will smash together(move into the same square)
- When multiple bots from different teams encounter, game randomly pick up two bots from two different teams to fight and randomly decide which one fight first.
- See: DominationGame.handlePossibleConflicts()
- Each hit takes a random 3~7 base point plus bonus damage for having nearby allies
- if distance ≤ 4 then bonus += 3;
- if distance ≤ 8 then bonus += 2;
- if distance ≤ 12 then bonus += 1;
- See: DominationGame.damageBots()
Respawn
- Game framework will attempt to place it into a spawn location where there is not already a bot in or next to. If not possible it will pick a random spawn point next to some bot.
- There is no limit to the number of respawns.
- Respawn points are owned by whichever team currently holds the closest Dom point to that respawn point
Create your own team
- Create your own java class which extends DominationBotTeam into package "edu.lu.DominationGame.Teams" .
- Go to execute.java and add your team’s class name into following two methods:
- execute.createTeam(String, int, Navigator)
- execute.createBotType(String)
Move your bots
- Bots are not technically supposed to be able to move anywhere besides to specific domination points. Which means you don’t have to control every step of your bots. The game framework will help you calculate a shortest path and move the bots.
- myBots.get(i).setNextMove(theGame.getDominationPointLocation(j))
- theGame.getNumDomPoints()
- Every team should extend DominationBotTeam. You should override the following methods:
- initializeTeam()
- finalizeTeam()
- updateBotActions()
- Called every game turn
- It should consist of the next move location of your bots
- See more details in /edu/lu/DominationGame/Teams/BasicTeam.java
- Note: You are not expected to use DominationGameBot.java. Teleporting around the map or damaging bots without fighting will be regard as cheating!
Tips for debugging
Change game speedCheck log file tempResults.txt in the root dirChange the parameter of “Thread.sleep(*)” in the method DominationGame.runGame(). So you can observe your team’s behavior more easily.
Game framework will log the status of the game every 100 game turns using the following format
Team1_score Team2_score gameCounter
Evaluation
I will use 3 bots and the same maps you currently have to test your teams, because this promotes the most interesting strategies as opposed to simply sending each bot to a domination point. I would set the total number of points to be to around 50,000 when I test your teams. So it's very important that your teams can learn from previews mistakes. If you want to get a quick result, you probably want to comment out the “Thread.sleep(*)” statement in the method DominationGame.runGame().
Submission
Please email your source code and all depending libs to me one day before the tournament. I will create a script to test your team against any other team and generate a rank automatically.
