Sign inSign up

affinefoundation/game

By affinefoundation

Updated 6 months ago

openspiel Game

Image
Machine learning & AI
0

1.9K

affinefoundation/game repository overview

GAME Environment

Task Description

The GAME environment evaluates language models on openspiel game https://github.com/google-deepmind/open_spiel. Models are presented with strategy with Random or MCTS opponent and must generate reasoning action to beat opponent.

How to Use with Affinetes

Option 1: Pull Pre-built Docker Image
import affinetes as af
import asyncio
import os

async def main():
    # Load environment from Docker Hub
    env = af.load_env(
        image="affinefoundation/game:openspiel",
        env_vars={"CHUTES_API_KEY": os.getenv("CHUTES_API_KEY")}
    )
    
    # Evaluate on a code generation task
    result = await env.evaluate(
        model="deepseek-ai/DeepSeek-V3",
        base_url="https://llm.chutes.ai/v1",
        task_id=388240510,
        seed=case1231233,
     
    )
    
    print(f"Score: {result['score']}")
    print(f"Success: {result['success']}")
    
    await env.cleanup()

asyncio.run(main())
Option 2: Build from Source
import affinetes as af
import asyncio
import os

async def main():
    # Build image from local environment directory
    image_tag = af.build_image_from_env(
        env_path="environments/openspiel",
        image_tag="game:openspiel"
    )
    
    # Load environment
    env = af.load_env(
        image=image_tag,
        env_vars={"CHUTES_API_KEY": os.getenv("CHUTES_API_KEY")}
    )
    
    # Evaluate on a code generation task
    result = await env.evaluate(
        model="deepseek-ai/DeepSeek-V3",
        base_url="https://llm.chutes.ai/v1",
        task_id=388240510,
        seed=case1231233,
        temperature=0.0,
    )
    
    print(f"Score: {result['score']}")
    
    await env.cleanup()

asyncio.run(main())

Tag summary

Content type

Image

Digest

sha256:73063649d

Size

318.7 MB

Last updated

6 months ago

docker pull affinefoundation/game:openspiel