All Downloads are FREE. Search and download functionalities are using the official Maven repository.

alloy-ggp-base.0.0.15.source-code.sample_gamer.py Maven / Gradle / Ivy

The newest version!
'''
@author: Sam
'''

import random

from org.ggp.base.util.statemachine import MachineState
from org.ggp.base.util.statemachine.implementation.prover import ProverStateMachine
from org.ggp.base.player.gamer.statemachine import StateMachineGamer

class SamplePythonGamer(StateMachineGamer):

    def getName(self):
        pass
        
    def stateMachineMetaGame(self, timeout):
        pass

    def stateMachineSelectMove(self, timeout):
        moves = self.getStateMachine().getLegalMoves(self.getCurrentState(), self.getRole())
        selection = random.choice(moves)
        return selection
        
    def stateMachineStop(self):
        pass
        
    def stateMachineAbort(self):
        pass        
        
    def getInitialStateMachine(self):
        return ProverStateMachine()




© 2015 - 2025 Weber Informatics LLC | Privacy Policy