Skip to content

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

Notifications You must be signed in to change notification settings

KangbingZhao/RoomAI

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RoomAI

Build Status Documentation Status PyPI version

RoomAI is a toolkit for developing AI-bots of Texas Holdem and Killers of Three Kingdoms (KTK).

Install and Get Started

You can install roomai with pip

pip install roomai

Try your first RoomAI program

#!/bin/python
from roomai.games. import *;
import roomai.common

class KuhnPokerExamplePlayer(roomai.common.AbstractPlayer):
    def receive_info(self, info):
        if info.person_state.available_actions is not None:
            self.available_actions = info.person_state.available_actions

    def take_action(self):
        values = self.available_actions.values()
        return list(values)[int(random.random() * len(values))]

    def reset(self):
        pass

if __name__ == "__main__":
    players = [KuhnPokerExamplePlayer() for i in range(2)] + [roomai.common.RandomPlayerChance()]
    # RandomChancePlayer is the chance player with the uniform distribution over every output
    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.

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%