concepts.benchmark.algorithm_env.sort_envs.ListSortingEnv#

class ListSortingEnv[source]#

Bases: SimpleRLEnvBase

Env for sorting a random permutation.

Methods

action(action)

append_stat(name, value)

clear_stats()

evaluate_one_episode(func)

finish(*args, **kwargs)

get_state()

Compute the state given the array.

play_one_episode(func[, ret_states, ...])

restart(*args, **kwargs)

Attributes

action_space

array

The underlying array to be sorted.

current_state

stats

unwrapped

__init__(nr_numbers)[source]#

Initialize the environment.

Parameters:

nr_numbers (int) – The number of numbers in the array.

__new__(**kwargs)#
action(action)#
append_stat(name, value)#
clear_stats()#
evaluate_one_episode(func)#
finish(*args, **kwargs)#
get_state()[source]#

Compute the state given the array.

play_one_episode(func, ret_states=False, ret_actions=False, restart_kwargs=None, finish_kwargs=None, max_steps=10000)#
restart(*args, **kwargs)#
property action_space#
property array#

The underlying array to be sorted.

property current_state#
property stats#
property unwrapped#