/RoomAI

A toolkit for developing and comparing AI-bots of imperfect information games.

Primary LanguagePythonMIT LicenseMIT

RoomAI

Build Status Documentation Status PyPI version Join the chat at https://gitter.im/roomai

RoomAI is a toolkit for developing and comparing AI-bots of imperfect information games.

Installation and Your First Try

You can install roomai with pip

pip install roomai

Try your first RoomAI program

#!/bin/python
from roomai.kuhn import *;
import random

class KuhnPokerExamplePlayer(roomai.common.AbstractPlayer):
    #@override
    def receive_info(self, info):
        if info.person_state.available_actions is not None:
            self.available_actions = info.person_state.available_actions
            
    #@override
    def take_action(self):
        return list(self.available_actions.values())[int(random.random() * len(self.available_actions))]
        
    #@overide
    def reset(self):
        pass

if __name__ == "__main__":
        players = [KuhnPokerExamplePlayer() for i in range(2)]
        env = KuhnPokerEnv()
        scores = KuhnPokerEnv.compete(env, players)
        print scores

For More Information

Contributors

If you would like to contribute to the project, please send me (lili1987mail at gmail.com) an email. We are always happy for more help.