rlcard.agents.human_agents

Subpackages

rlcard.agents.human_agents.blackjack_human_agent

class rlcard.agents.human_agents.blackjack_human_agent.HumanAgent(num_actions)

Bases: object

A human agent for Blackjack. It can be used to play alone for understand how the blackjack code runs

eval_step(state)

Predict the action given the current state for evaluation. The same to step here.

Parameters

state (numpy.array) – an numpy array that represents the current state

Returns

the action predicted (randomly chosen) by the random agent

Return type

action (int)

static step(state)

Human agent will display the state and make decisions through interfaces

Parameters

state (dict) – A dictionary that represents the current state

Returns

The action decided by human

Return type

action (int)

rlcard.agents.human_agents.leduc_holdem_human_agent

class rlcard.agents.human_agents.leduc_holdem_human_agent.HumanAgent(num_actions)

Bases: object

A human agent for Leduc Holdem. It can be used to play against trained models

eval_step(state)

Predict the action given the curent state for evaluation. The same to step here.

Parameters

state (numpy.array) – an numpy array that represents the current state

Returns

the action predicted (randomly chosen) by the random agent

Return type

action (int)

static step(state)

Human agent will display the state and make decisions through interfaces

Parameters

state (dict) – A dictionary that represents the current state

Returns

The action decided by human

Return type

action (int)

rlcard.agents.human_agents.limit_holdem_human_agent

class rlcard.agents.human_agents.limit_holdem_human_agent.HumanAgent(num_actions)

Bases: object

A human agent for Limit Holdem. It can be used to play against trained models

eval_step(state)

Predict the action given the curent state for evaluation. The same to step here.

Parameters

state (numpy.array) – an numpy array that represents the current state

Returns

the action predicted (randomly chosen) by the random agent

Return type

action (int)

static step(state)

Human agent will display the state and make decisions through interfaces

Parameters

state (dict) – A dictionary that represents the current state

Returns

The action decided by human

Return type

action (int)

rlcard.agents.human_agents.nolimit_holdem_human_agent

class rlcard.agents.human_agents.nolimit_holdem_human_agent.HumanAgent(num_actions)

Bases: object

A human agent for No Limit Holdem. It can be used to play against trained models

eval_step(state)

Predict the action given the curent state for evaluation. The same to step here.

Parameters

state (numpy.array) – an numpy array that represents the current state

Returns

the action predicted (randomly chosen) by the random agent

Return type

action (int)

static step(state)

Human agent will display the state and make decisions through interfaces

Parameters

state (dict) – A dictionary that represents the current state

Returns

The action decided by human

Return type

action (int)

rlcard.agents.human_agents.uno_human_agent

class rlcard.agents.human_agents.uno_human_agent.HumanAgent(num_actions)

Bases: object

A human agent for Leduc Holdem. It can be used to play against trained models

eval_step(state)

Predict the action given the curent state for evaluation. The same to step here.

Parameters

state (numpy.array) – an numpy array that represents the current state

Returns

the action predicted (randomly chosen) by the random agent

Return type

action (int)

static step(state)

Human agent will display the state and make decisions through interfaces

Parameters

state (dict) – A dictionary that represents the current state

Returns

The action decided by human

Return type

action (int)