Crafting - Abstract tasks managment

Gym Environment

class CraftingEnv(*args: Any, **kwargs: Any)

Bases: gym.

Generic Crafting Environment

metadata = {'render.modes': ['human', 'ansi']}
action(action_type: str, identification: int)int

Return action_id from action type and identifier.

Parameters
  • action_type – One of {‘get’, ‘craft’, ‘move’}.

  • identification – Id of the item, recipe or zone.

Returns

The corresponding discrete action ID.

action_from_id(action_id: int)str

Return action_id from action type and identifier.

Parameters

action_id – A discrete action ID.

Returns

The action type and object concerned by the action.

step(action: numpy.ndarray)Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray, dict]

Return the legal actions

get_observation()numpy.ndarray

Return the current observation

reset()numpy.ndarray
render(mode='human')