File size: 943 Bytes
9b43224
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Copyright (c) 2024 TeeUnit Project
# SPDX-License-Identifier: MIT

"""
TeeUnit OpenEnv Environment

An OpenEnv-compatible multi-agent arena environment wrapping the real Teeworlds 0.7.5 game
for LLM-based reinforcement learning training.

Example:
    >>> from teeunit_env import TeeEnv
    >>> 
    >>> with TeeEnv(base_url="http://localhost:8000") as env:
    ...     env.reset()
    ...     tools = env.list_tools()
    ...     print([t.name for t in tools])
    ...     # ['move', 'jump', 'aim', 'shoot', 'hook', 'get_status']
    ...     
    ...     # Get current game state
    ...     status = env.call_tool("get_status")
    ...     print(status)
    ...     
    ...     # Take actions
    ...     env.call_tool("move", direction="right")
    ...     env.call_tool("aim", x=500, y=300)
    ...     env.call_tool("shoot", weapon=1)
"""

from .client import TeeEnv, TeeAction

__all__ = ["TeeEnv", "TeeAction"]
__version__ = "0.1.0"