Overview
The baselines currently rely on a low-level socket to handle communication and send commands. As more complex RL models are developed using this library, such communication with the game client should be abstracted into an interface like one popularized by OpenAI's Gym.
Implementation
The PolycraftEnv should support the following functions:
- reset
- Prepares the client for a new experiment
- step
- Sends an action to the client and receives an observation
- close
Additionally, the game should be initialized when the constructor is called. The environment should support the following workflow:
from polycraft_env import setup_env
env = setup_env()
observation = env.reset()
for episode in range(10):
action = 'SENSE_ALL'
observation, reward, done, info = env.step(action)
env.close()
And for convenience it should support context manager functionality:
from polycraft_env import setup_env
with setup_env() as env:
for episode in range(10):
action = 'SENSE_ALL'
observation, reward, done, info = env.step(action)
Overview
The baselines currently rely on a low-level socket to handle communication and send commands. As more complex RL models are developed using this library, such communication with the game client should be abstracted into an interface like one popularized by OpenAI's Gym.
Implementation
The
PolycraftEnvshould support the following functions:Additionally, the game should be initialized when the constructor is called. The environment should support the following workflow:
And for convenience it should support context manager functionality: