Sie sind auf Seite 1von 21

The

Pacman
Project

The Pacman Project

University of Maastricht, MICC


The
Pacman
Project

Group Overview
• Advisors:
– Jean Derks
– Pieter Spronck

• Group Members:
– Thomas Debray
– Yannick Soldati
– Anton Valkenberg
– Kalle Fischer
– Milad Memerian
– Michael Wiedau

University of Maastricht, MICC


The
Pacman
Project

Topics
• Project Overview
• Structure
• PDA
• GPS
• AI approaches
• Genetic Algorithms: basics
• Simulation
• Future Work
• Conclusion

University of Maastricht, MICC


The
Pacman
Project

Structure

University of Maastricht, MICC


The
Pacman
Project

PDA (Client)

-GPS receiver to get position


-Software to show the map with the advices
-Developed in .NET
-Using the simulator of Microsoft
visual studio
-Same for pacman an ghost
(selection at the start-up)

University of Maastricht, MICC


The
Pacman
Project

GPS (Receiver)
How to get our position with the gps
receiver?

-The PDA receives the satellites positions


-Same satellite gives a wrong position
- Atmospheric
- Ephemeris
-…

2 possible solutions
- Write the gps receiver software
(very long with a lot of mathematics)
- Use a framework

University of Maastricht, MICC


The
Pacman
Project

The GEO framework


- Build with the .net
framework

- Doesn’t need an internet


connection

- Using also personal maps

- Very easy and fast to use

University of Maastricht, MICC


The
Pacman
Project

AI approaches
Defining interest to pacman

We can define three criteria:

• When the game is neither too hard nor too easy


• When there is diversity in opponents’ behavior
over the games
• When opponents’ behavior is aggressive rather
than static

Next, we need to translate this into formulae.

University of Maastricht, MICC


The
Pacman
Project

AI approaches
Defining interest to pacman

– E{tk} is the average number of simulation steps taken to kill PacMan over the N
games
– Max{tk} is the maximum tk over the N games
– p1 is a weighting parameter

– where

– p1 is a weighting parameter

University of Maastricht, MICC


The
Pacman
Project

AI approaches
Defining interest to pacman

– Vn is the total number of visits of all visited cells


– p3 is a weighting parameter

– I is the interest value of the Pac-Man game


– γ; δ and ε are criterion weight parameters

University of Maastricht, MICC


The
Pacman
Project

AI approaches
Evolutionary, Rule-based approach

• Explore & retreat state


• Planning long sequence of moves is ineffective
• Classify ghost’s position for intersections
• Current direction of movement depends on:
- previous direction
- turn type
- orientation
- (in retreat mode) the ghost’s location

• Result: 85 parameters that control


the agent’s behaviour
• Train the parameters by a genetic algorithm
• Backdraw: complex real-world turn types

University of Maastricht, MICC


The
Pacman
Project

AI approaches
Cross-entropy approach

• Specify rule-based policy:

1) the possible actions


2) the possible conditions and how are they constructed from observations
3) how to make rules from conditions & actions
4) how to combine the rules into policies
• Requirements ruleset:
- modules easy to implement but potentially useful
- mechanism for conflict resolution: priorities
- List of observations
- List of actions
• Module with highest priority decides the direction of Ms. Pac-Man

University of Maastricht, MICC


The
Pacman
Project

AI approaches
Cross-entropy approach

University of Maastricht, MICC


The
Pacman
Project

Genetic Algorithms: basics


• Encode potential solution to the problem:
chromosome
• Compute fitness chromosome
• Select 2 members from the current population
(selection: roulette wheel)
• Apply selection/mutation/crossover
• Repeat process for N generations

University of Maastricht, MICC


The
Pacman
Project

Potential
PotentialField
Field
• Mechanism to determine in which direction to
proceed
• System of peaks and trough
– Items conductive to game scoring having positive value
– Ghosts having negative values
• The values for those rewards and penalties can
be learned
• Leads Pacman to the peaks along the steepest
slopes

University of Maastricht, MICC


The
Pacman
Project

Neural
NeuralNetwork
Network
• Neural Networks are one more way to interpret the
situation
– Graph based representation of the map
– Each node has a feature vector
– values of those feature vectors are interpreted by the Neural
Network
• The weights for the NN are learned using an
evolutionary algorithm
• Performance is measured by taking the average score
of games

University of Maastricht, MICC


The
Pacman
Project

Neural
NeuralNetwork
Network
• The choice of the inputs to the NN is crucial
– Wrong choice places significant limitations on the
performance

• Distances should be measured


as shortest path and not as
Euclidean
• For our case the direction of the
closest ghost could also be
interesting

• This approach can be used for the pacman as well


as for the ghosts
University of Maastricht, MICC
The
Pacman
Project

Simulation
• Training environment
• Simplification external world
(map – movement – behavior)
• Input: starting positions, movement speed, AI
• Movement decided by AI advise
• Evolve through evolution
• Fitness calculation ~ scored points, elapsed time, ...
• Output: AI optimized parameters

University of Maastricht, MICC


The
Pacman
Project

Future work
• Start of programming the different modules
• AI programming
• GPS/PDA programming
• Simulation Environment
• Additional research

University of Maastricht, MICC


The
Pacman
Project

Conclusion
• Defined structure for the program
• Simulation environment
• PDA/GPS, GEO framework
• Research pacman-AI done
– Genetic approach
– Mathematical interest

University of Maastricht, MICC


The
Pacman
Project

Questions?

University of Maastricht, MICC

Das könnte Ihnen auch gefallen