Skip to content

Game environment should make consistent use of PlayerAction enum #12

Description

@thowell332

Description: This is a suggested enhancement to the definition and usage of the PlayerAction enum in the game environment. Currently, socket_env.py maintains its own list of action commands that is nearly identical to the enum already defined in enums/player_action.py. This is an unnecessary duplication of information and creates confusion about the correct action names, since there are slight differences between the two representations.

class PlayerAction(IntEnum):
NOP = 0,
NORTH = 1,
SOUTH = 2,
EAST = 3,
WEST = 4,
INTERACT = 5,
TOGGLE = 6,
CANCEL = 7,
PICKUP = 8,
RESET = 9,

ACTION_COMMANDS = ['NOP', 'NORTH', 'SOUTH', 'EAST', 'WEST', 'INTERACT', 'TOGGLE_CART', 'CANCEL', 'SELECT','RESET']

Solution: Consistent action names should be used throughout the game environment and all code in the game environment should use the common representation of player actions defined in enums/player_action.py.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions