Giter Club home page Giter Club logo

pacman-duel-bot's Introduction

Entelect Challenge 2014: Pacman Duel Bot AI

Introduction

My entry to the 2014 Entelect Challenge.

There were around 69 entries divided into 2 pools:

  1. Pool A (Advanced)

  2. Pool B (Beginner)

This entry did qualify for Pool A, and was placed 4th out of 35 entries in Pool A.

Rules

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

Solution strategy

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:

  1. 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.

  2. 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.

Tools used

Visual Studio 2013

Building the solution

  1. First, ensure that MSBuild is installed on your system, and the path to MSbuild is set in Environment Variables.
  2. In the solution directory, run compile.bat in the command prompt, or
  3. Simply build the solution through visual studio 2013.

Running the application

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.