Advertisement

Another round of updates to PacMan Evolution

Started by April 11, 2008 05:27 PM
-1 comments, last by kirkd 16 years, 7 months ago
***If you downloaded this prior to 4:00 pm EST on 11 April 2008, you might try to download again to make sure you have the latest files. I had a little trouble with SourceForge uploads.*** Once again for those who are interested in such things, I have just updated my Evolutionary PacMan project on SourceForge: http://sourceforge.net/projects/aipac/ Details: v0.1.5 updates -------------- Vector-based inputs implemented. Walls are input as a window. Pellet inputs provide a distance and angle to each power pellet, ghost inputs provide distance, angle, and state (-1 = hunting, 1 = blue) to each ghost, dot inputs show distance and angle to the centroid of all remaining dots. All vectors assume PacMan as the origin. EnforceIntersections was added to the control parameters. If set to 1, PM will only make a directional change at an intersection. If set to 0, PM can change direction at will. There's a bit of a speed up with this as well as enforcing smooth paths. **Verify proper scoring for dots - the possible maximum score should be 284 dots * 10. (Ghosts and Pellets seem to be OK.)** I found that at certain intersections mulitple dots are removed simultaneously due to a perceived overlap of the bounding box and dot tiles, but only one produced a score. A modification was made to count how many dots are removed for any particular PacMan location and the score adjusted appropriately. MapController::ModifyTileByPixel The visualization delay was linked to the parameters file. Larger numbers cause the visualization to run more slowly so that it is easier to watch. This does not affect the actual GA portion, just the visual of PacMan running through the maze. The same delay is linked to the playable mode option. A user playable option is now available. The parameter Mode can be set to Evolve to run an evolutionary simulation, or to Play for a Keyboard playable version. Use the arrow keys to move PacMan around the maze. All the other options remain the same. **Fix the gate on the ghost cage - it doesn't redisplay and it may not be reset.** A forced redraw of the entire maze was implemented any time the gate is opened or closed. This does not appear to slow the process whatsoever and in fact I can force a redraw at every frame without any noticable performance losses. This is a much easier fix than to implement specific drawing and erasing of the gate, or modification of the maze graphics. v0.1.4 Updates -------------- A few bugs were fixed. Specifically, some issues with whether PowerPellets and Ghosts were visible or not were addressed. The ability to ignore walls or dots was added to the Windowed AI. In the parameters file the following keywords control this as follows: DotWallSingleInput - If set to 1, the input will be -1 for a wall, 0 if empty, and 1 for a dot. If set to 0, there will be two sets of inputs - one for dots one for walls. DotsWallsOnly - If set to 0, both dots and walls will be used for inputs. If set to -1, only the walls will be seen. If set to 1, only the dots will be seen. v0.1.3 UPDATES: --------------- Windows now update during the evolution step thus preventing an freezing of the application during one epoch. The console window now tells you whether PacMan will run or not after the current epoch and has (almost) instant feedback from pressing 'B'. Small optimizations to speed up the simulation. Ghosts now allowed to reevaluate their direction after PacMan eats PowerPellet. Hopefully this will discourage chance collisions forcing PacMan to be more active in pursuit. When the console window was running a spontaneous crash would occur the seemed to stem from the Windows message queue. A DoEvents() function was implemented to allow window events to be processed while the Console was active. This seems to have solved the problem. [Edited by - kirkd on April 11, 2008 6:50:52 PM]

This topic is closed to new replies.

Advertisement