RLApp

colosseumrl.RLApp.create_rl_agent(agent_fn: Callable[[colosseumrl.ClientEnvironment.ClientEnvironment], None], host: str, port: int, auth_key: str = '', client_environment: Type[colosseumrl.ClientEnvironment.ClientEnvironment] = <class 'colosseumrl.ClientEnvironment.ClientEnvironment'>, server_environment: Optional[Type[colosseumrl.BaseEnvironment.BaseEnvironment]] = None, time_out: int = 0)[source]

Create an online reinforcement learning agent from an agent function.

Parameters
  • agent_fn – Agent function that has the client environment as the first parameter.

  • host (str) – Hostname of game server.

  • port (int) – Port of the game server.

  • auth_key (str) – Authorization key if the server is whitelisted.

  • client_environment (Type[ClientEnvironment], optional.) – The client environment to create when connected. By default, this will create a generic client environment. Most games will have a provided client environment with specialized functions for interacting with the environment.

  • server_environment (Type[BaseEnvironment], optional.) – The server environment if you know what game and environment the server is running. While this parameter is technically optional, unless you’re running some strange dynamic game with different possible environments at the same time, you should provide this so that all of the functionality of the client environment is enabled.

  • time_out (int, optional.) – The timeout for connecting to the server.

Returns

An application ready to run with the agent function.

Return type

RLApp

colosseumrl.RLApp.launch_rl_agent(agent_fn: Callable[[colosseumrl.ClientEnvironment.ClientEnvironment], None], host: str, port: int, auth_key: str = '', client_environment: Type[colosseumrl.ClientEnvironment.ClientEnvironment] = <class 'colosseumrl.ClientEnvironment.ClientEnvironment'>, server_environment: Optional[Type[colosseumrl.BaseEnvironment.BaseEnvironment]] = None, time_out: int = 0, **kwargs)[source]

Create and launch an online reinforcement learning agent from an agent function.

Parameters
  • agent_fn – Agent function that has the client environment as the first parameter.

  • host (str) – Hostname of game server.

  • port (int) – Port of the game server.

  • auth_key (str) – Authorization key if the server is whitelisted.

  • client_environment (Type[ClientEnvironment], optional.) – The client environment to create when connected. By default, this will create a generic client environment. Most games will have a provided client environment with specialized functions for interacting with the environment.

  • server_environment (Type[BaseEnvironment], optional.) – The server environment if you know what game and environment the server is running. While this parameter is technically optional, unless you’re running some strange dynamic game with different possible environments at the same time, you should provide this so that all of the functionality of the client environment is enabled.

  • time_out (int, optional.) – The timeout for connecting to the server.

  • **kwargs – Any additional options that will be passed into your client function

Returns

The return values of your agent function.

Return type

object