My entry to the 2014 Entelect Challenge.
There were around 69 entries divided into 2 pools:
-
Pool A (Advanced)
-
Pool B (Beginner)
This entry did qualify for Pool A, and was placed 4th out of 35 entries in Pool A.
Rule #1: Develop an artificially intelligent bot that is able to navigate the following pacman maze and collect more pills than an opponent.
###################
#........#........#
#*##.###.#.###.##*#
#.##.###.#.###.##.#
#.................#
#.##.#.#####.#.##.#
#....#...#...#....#
####.###.#.###.####
####.#.......#.####
####.#.## ##.#.####
A...# #...B
####.#.## ##.#.####
####.#.......#.####
####.#.#####.#.####
#........#........#
#.##.###.#.###.##.#
#*.#...........#.*#
##.#.#.#####.#.#.##
#....#...#...#....#
#.######.#.######.#
#.................#
###################
Key:
Pill (.): Gain 1 point.
Bonus Pill (*): Gain 10 points.
Wall (#): Well, you can't go through the wall unless you are... Chuck Norris.
Rule #2: Can be found here
as a matter of fact: Unless it's the lass pill standing, never ever waste time (and milk) going to a pill you are certain that your opponent will reach it before you. Right? I hear you say NOOOOO!
path finding: I use A*.
the fact is: my bot is very hungry
in making the decision, the bot combines the above and below principles:
-
If we can score point in 1 move, score the point, and in the case where we have more than one path to collect points, we normally prefer the longest streak.
-
We break the maze into 2 portions:
-
Lower part: lower than the maze tunnel, and
-
Upper part: above and including the maze tunnel. Then,
- If we are in the lower part and we can win, we stay there. The same happens for the upper part.
- If opponent is in the lower part, and she can win, the strategy is to go there and disturb her. The same happnens for the upper part.
in a watch out: All the above happen while we search the neighbourhood for bonus pill.
Visual Studio 2013
- First, ensure that MSBuild is installed on your system, and the path to MSbuild is set in Environment Variables.
- In the solution directory, run compile.bat in the command prompt, or
- Simply build the solution through visual studio 2013.
Run the solution by building and running the test harness provided here. You'll need to provide 2 arguments, botA and botB to the test harness, i.e.
PacManDuel.exe C:\pacman\botA start.bat C:\pacman\botB start.bat
where this solution can be either botA or botB. C:\pacman\botA is the directory for BotA, and start.bat is a batch file to start the bot executable.
How about you write your own bot and wacth it get torn by mine, or just create two folders for this very same bot and watch it fight agaist itself.