![JAR search and dependency download from the Maven repository](/logo.png)
alloy-ggp-base.0.0.15.source-code.sample_gamer.py Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alloy-ggp-base Show documentation
Show all versions of alloy-ggp-base Show documentation
A modified version of the GGP-Base library for Alloy.
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