Click anywhere to close

PlAI Beta Event

Plai Beta Event

Plai is hosting the first

What is PlAI

Cool, how do I compete?

First install the plai library

pip install -U git+git://github.com/frenchie4111/plai

Then create your agent and connect!

Click to expand random_agent.py

# Example random agent
from plai import RemoteEnv

env = RemoteEnv( 'sample_api_key' )

obs = env.reset() # Wait for game to start

while True:
    obs, rew, done, info = env.step( env.action_space.sample() )

    if done:
        if rew == 1:
            print( 'I won!' )
        elif rew == -1:
            print( 'I lost!' )
        obs = env.reset() # Wait for next game to start