We provide a base class AgentBase
with some utils functions to extract the desired state from the observation. You can inherit the base class and implement your onw method in the air_hockey_agent/agent_builder.py
file. A Dummy Agent example can be found in Dummy Agent <dummy_agent>
.
We also provide a simple and effective way of save and load your agent. We extend the Dummy Agent
example and set different type of variables. You can add these variables into saving list by calling self.__add_save_attr
function.
The available methods are:
- primitive, to store any primitive type. This includes lists and dictionaries of primitive values.
- numpy, to store NumPy arrays.
- torch, to store any torch object.
- pickle, to store any Python object that cannot be stored with the above methods.
- json, can be used if you need a textual output version, that is easy to read.
- none, add the attributes, you can assign the values to the attribute later.
examples/save_load_agent_example.py
air_hockey_challenge.framework.agent_base
air_hockey_challenge.framework.agent_base.AgentBase
__init__
reset
draw_action
get_puck_state
get_joint_state
get_puck_pos
get_puck_vel
get_joint_pos
get_joint_vel
get_ee_pose
save
load_agent