spaceinvaders_ai

Space Invaders AI using Q-Learning
Log | Files | Refs | README

Actions.py (689B)


      1 from enum import Enum
      2 from MAMEToolkit.emulator import Action
      3 
      4 class Actions(Enum):
      5     # coins
      6     insert_coin = Action(':COIN', 'Coin 1')
      7     p1_start = Action(':IN1', '1 Player Start')
      8     p2_start = Action(':IN1', '2 Players Start')
      9     coinage = Action(':IN2', 'Display Coinage')
     10 
     11     # lives
     12     bonus_life = Action(':IN2', 'Bonus Life')
     13     lives = Action(':IN2', 'Lives')
     14 
     15     # p1 movement
     16     p1_right = Action(':CONTP1', 'P1 Right')
     17     p1_left = Action(':CONTP1', 'P1 Left')
     18     p1_shoot = Action(':CONTP1', 'P1 Button 1')
     19 
     20     #p2 movement
     21     p2_right = Action(':CONTP2', 'P2 Right')
     22     p2_left = Action(':CONTP2', 'P2 Left')
     23     p2_shoot = Action(':CONTP2', 'P2 Button 1')