1 / 18

A Penguin Attack AI

A Penguin Attack AI. Jason Buck CS 470. 1. Project Overview. Goal Develop an AI that can play a competent game of Penguin Attack Why Ensures an opponent is always available. What is Penguin Attack? Created by myself and Tom Kircher Open source implementation of a Nintendo puzzle game

drew
Download Presentation

A Penguin Attack AI

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Penguin Attack AI Jason Buck CS 470 1

  2. Project Overview • Goal • Develop an AI that can play a competent game of Penguin Attack • Why • Ensures an opponent is always available

  3. What is Penguin Attack? • Created by myself and Tom Kircher • Open source implementation of a Nintendo puzzle game • Designed for network play

  4. How is Penguin Attack Played? 4

  5. How is Penguin Attack Played? (continued)

  6. Project Requirements • Network • AI is a network client • Sends moves • Game server sends game state information • Sends game state information • Sends control signals

  7. Project Requirements (continued) • AI • Search game state for potential combos • Generate move sequence to achieve combos • Can send a string of sequential characters • Often sends one-character strings • Must be competent • Typically able to last 3 min against me

  8. System Design • Written in Java • Not ideal, but “good enough” • Network component • Largely isolated from AI • Connects to the server • Receive and store messages from the server • Send moves/commands from the AI to the server

  9. System Design (Continued) • AI • Parse game state data • Update internal representation • 2D-array of ADT “PenguinAttackBlock” • Generate move sequence

  10. Protocol • Redesigned since proposal • Client requests state information as needed • Commands are b, c, and t • Client sends move sequences • Commands are u, d, l, r, s, m • Client can notify server with quit • All other notifications are server to client

  11. Protocol (Continued) • Server notifications: • start • pause ... start • win • lose • closing connection

  12. Protocol (Continued) Mouse position: <2 1> Board State: b{ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 0n1. 1n1h _ _ _ _ 0n5. 1n3h1n4h _ _ 0n1.0n4. 2n5h1n2h1n5h0n3.0n4.0n1. _ _ _ 0n2.0n2.0n5. _ _ 0n1.0n3.0n3.0n4. 0n5.0n1.0n2.0n4.0n4.0n5. 0n4.0n3.0n5.0n1.0n2.0n1. 0n1.0n3.0n1.0n4.0n4.0n2. 0n1.0n2.0n3.0n3.0n2.0n2. 0n5.0n5.0n4.0n4.0n1.0n1. 0n3q0n3q0n4q0n4q0n1q0n4q } Timing: [1000 2000]

  13. Algorithms • playPenguinAttack() loops through: raiseStackToSafeHeight(); breakGarbage(); raiseStackToSafeHeight(); levelOffStack(); raiseStackToSafeHeight(); breakGarbage(); raiseStackToSafeHeight(); makeCombosAndChains();

  14. Evolutionary Prototyping • Strategy needed to be refined • Different leveling algorithms • Keep improving the strategy • Much time spent testing • Prototype was never ‘complete’ to my satisfaction • Never figured out how to make intentional chains • Didn’t find a way to deal with ‘accidentals’

  15. Schedule • Didn’t keep detailed records of what happened when • Worked on it whenever course load allowed • Made majority of progress during spring break • Spent way more time than budgeted

  16. What’s next? • Will continue beyond the semester • Preventing accidentals and intentionally making chains; AI will be brutal • Analyze the board in different ways while waiting (Threads) • Improve efficiency (Synchronized clock? Maintain own board state?) 17

  17. Conclusion

More Related