city_of_gold.vec.sampler
Vectorized action samplers
Members
- class city_of_gold.vec.sampler.vec_sampler_1
Bases:
pybind11_objectVectorized random agent for 1 environments
- Parameters:
seed (unsigned integer or None) – (Optional) Set the random generator seed for the sampler. Unique seeds in the form seed+i are used to initialize the individual samplers, with i being the index of the sampler.
- Returns:
The instantiated vector of action samplers
- get_actions(self: city_of_gold.vec.sampler.vec_sampler_1) numpy.ndarray[city_of_gold.ActionData]
Get a reference to the samplers internal vector of sampled actions.
The contents are overwritten every time
sample()is called. :returns: The vector where sampled actions are placed :rtype:numpy.ndarrayofActionData
- sample(self: city_of_gold.vec.sampler.vec_sampler_1, action_mask: numpy.ndarray[city_of_gold.ActionMask]) None
Generate a uniform sample of the valid action space for each environment.
Update the contents of actions with a new sample masked using the input action mask. :param action_mask: mask specifying valid actions for each environment :type action_mask:
numpy.ndarrayofActionMask:return: None
- class city_of_gold.vec.sampler.vec_sampler_128
Bases:
pybind11_objectVectorized random agent for 128 environments
- Parameters:
seed (unsigned integer or None) – (Optional) Set the random generator seed for the sampler. Unique seeds in the form seed+i are used to initialize the individual samplers, with i being the index of the sampler.
- Returns:
The instantiated vector of action samplers
- get_actions(self: city_of_gold.vec.sampler.vec_sampler_128) numpy.ndarray[city_of_gold.ActionData]
Get a reference to the samplers internal vector of sampled actions.
The contents are overwritten every time
sample()is called. :returns: The vector where sampled actions are placed :rtype:numpy.ndarrayofActionData
- sample(self: city_of_gold.vec.sampler.vec_sampler_128, action_mask: numpy.ndarray[city_of_gold.ActionMask]) None
Generate a uniform sample of the valid action space for each environment.
Update the contents of actions with a new sample masked using the input action mask. :param action_mask: mask specifying valid actions for each environment :type action_mask:
numpy.ndarrayofActionMask:return: None
- class city_of_gold.vec.sampler.vec_sampler_16
Bases:
pybind11_objectVectorized random agent for 16 environments
- Parameters:
seed (unsigned integer or None) – (Optional) Set the random generator seed for the sampler. Unique seeds in the form seed+i are used to initialize the individual samplers, with i being the index of the sampler.
- Returns:
The instantiated vector of action samplers
- get_actions(self: city_of_gold.vec.sampler.vec_sampler_16) numpy.ndarray[city_of_gold.ActionData]
Get a reference to the samplers internal vector of sampled actions.
The contents are overwritten every time
sample()is called. :returns: The vector where sampled actions are placed :rtype:numpy.ndarrayofActionData
- sample(self: city_of_gold.vec.sampler.vec_sampler_16, action_mask: numpy.ndarray[city_of_gold.ActionMask]) None
Generate a uniform sample of the valid action space for each environment.
Update the contents of actions with a new sample masked using the input action mask. :param action_mask: mask specifying valid actions for each environment :type action_mask:
numpy.ndarrayofActionMask:return: None
- class city_of_gold.vec.sampler.vec_sampler_2
Bases:
pybind11_objectVectorized random agent for 2 environments
- Parameters:
seed (unsigned integer or None) – (Optional) Set the random generator seed for the sampler. Unique seeds in the form seed+i are used to initialize the individual samplers, with i being the index of the sampler.
- Returns:
The instantiated vector of action samplers
- get_actions(self: city_of_gold.vec.sampler.vec_sampler_2) numpy.ndarray[city_of_gold.ActionData]
Get a reference to the samplers internal vector of sampled actions.
The contents are overwritten every time
sample()is called. :returns: The vector where sampled actions are placed :rtype:numpy.ndarrayofActionData
- sample(self: city_of_gold.vec.sampler.vec_sampler_2, action_mask: numpy.ndarray[city_of_gold.ActionMask]) None
Generate a uniform sample of the valid action space for each environment.
Update the contents of actions with a new sample masked using the input action mask. :param action_mask: mask specifying valid actions for each environment :type action_mask:
numpy.ndarrayofActionMask:return: None
- class city_of_gold.vec.sampler.vec_sampler_256
Bases:
pybind11_objectVectorized random agent for 256 environments
- Parameters:
seed (unsigned integer or None) – (Optional) Set the random generator seed for the sampler. Unique seeds in the form seed+i are used to initialize the individual samplers, with i being the index of the sampler.
- Returns:
The instantiated vector of action samplers
- get_actions(self: city_of_gold.vec.sampler.vec_sampler_256) numpy.ndarray[city_of_gold.ActionData]
Get a reference to the samplers internal vector of sampled actions.
The contents are overwritten every time
sample()is called. :returns: The vector where sampled actions are placed :rtype:numpy.ndarrayofActionData
- sample(self: city_of_gold.vec.sampler.vec_sampler_256, action_mask: numpy.ndarray[city_of_gold.ActionMask]) None
Generate a uniform sample of the valid action space for each environment.
Update the contents of actions with a new sample masked using the input action mask. :param action_mask: mask specifying valid actions for each environment :type action_mask:
numpy.ndarrayofActionMask:return: None
- class city_of_gold.vec.sampler.vec_sampler_3
Bases:
pybind11_objectVectorized random agent for 3 environments
- Parameters:
seed (unsigned integer or None) – (Optional) Set the random generator seed for the sampler. Unique seeds in the form seed+i are used to initialize the individual samplers, with i being the index of the sampler.
- Returns:
The instantiated vector of action samplers
- get_actions(self: city_of_gold.vec.sampler.vec_sampler_3) numpy.ndarray[city_of_gold.ActionData]
Get a reference to the samplers internal vector of sampled actions.
The contents are overwritten every time
sample()is called. :returns: The vector where sampled actions are placed :rtype:numpy.ndarrayofActionData
- sample(self: city_of_gold.vec.sampler.vec_sampler_3, action_mask: numpy.ndarray[city_of_gold.ActionMask]) None
Generate a uniform sample of the valid action space for each environment.
Update the contents of actions with a new sample masked using the input action mask. :param action_mask: mask specifying valid actions for each environment :type action_mask:
numpy.ndarrayofActionMask:return: None
- class city_of_gold.vec.sampler.vec_sampler_32
Bases:
pybind11_objectVectorized random agent for 32 environments
- Parameters:
seed (unsigned integer or None) – (Optional) Set the random generator seed for the sampler. Unique seeds in the form seed+i are used to initialize the individual samplers, with i being the index of the sampler.
- Returns:
The instantiated vector of action samplers
- get_actions(self: city_of_gold.vec.sampler.vec_sampler_32) numpy.ndarray[city_of_gold.ActionData]
Get a reference to the samplers internal vector of sampled actions.
The contents are overwritten every time
sample()is called. :returns: The vector where sampled actions are placed :rtype:numpy.ndarrayofActionData
- sample(self: city_of_gold.vec.sampler.vec_sampler_32, action_mask: numpy.ndarray[city_of_gold.ActionMask]) None
Generate a uniform sample of the valid action space for each environment.
Update the contents of actions with a new sample masked using the input action mask. :param action_mask: mask specifying valid actions for each environment :type action_mask:
numpy.ndarrayofActionMask:return: None
- class city_of_gold.vec.sampler.vec_sampler_4
Bases:
pybind11_objectVectorized random agent for 4 environments
- Parameters:
seed (unsigned integer or None) – (Optional) Set the random generator seed for the sampler. Unique seeds in the form seed+i are used to initialize the individual samplers, with i being the index of the sampler.
- Returns:
The instantiated vector of action samplers
- get_actions(self: city_of_gold.vec.sampler.vec_sampler_4) numpy.ndarray[city_of_gold.ActionData]
Get a reference to the samplers internal vector of sampled actions.
The contents are overwritten every time
sample()is called. :returns: The vector where sampled actions are placed :rtype:numpy.ndarrayofActionData
- sample(self: city_of_gold.vec.sampler.vec_sampler_4, action_mask: numpy.ndarray[city_of_gold.ActionMask]) None
Generate a uniform sample of the valid action space for each environment.
Update the contents of actions with a new sample masked using the input action mask. :param action_mask: mask specifying valid actions for each environment :type action_mask:
numpy.ndarrayofActionMask:return: None
- class city_of_gold.vec.sampler.vec_sampler_5
Bases:
pybind11_objectVectorized random agent for 5 environments
- Parameters:
seed (unsigned integer or None) – (Optional) Set the random generator seed for the sampler. Unique seeds in the form seed+i are used to initialize the individual samplers, with i being the index of the sampler.
- Returns:
The instantiated vector of action samplers
- get_actions(self: city_of_gold.vec.sampler.vec_sampler_5) numpy.ndarray[city_of_gold.ActionData]
Get a reference to the samplers internal vector of sampled actions.
The contents are overwritten every time
sample()is called. :returns: The vector where sampled actions are placed :rtype:numpy.ndarrayofActionData
- sample(self: city_of_gold.vec.sampler.vec_sampler_5, action_mask: numpy.ndarray[city_of_gold.ActionMask]) None
Generate a uniform sample of the valid action space for each environment.
Update the contents of actions with a new sample masked using the input action mask. :param action_mask: mask specifying valid actions for each environment :type action_mask:
numpy.ndarrayofActionMask:return: None
- class city_of_gold.vec.sampler.vec_sampler_6
Bases:
pybind11_objectVectorized random agent for 6 environments
- Parameters:
seed (unsigned integer or None) – (Optional) Set the random generator seed for the sampler. Unique seeds in the form seed+i are used to initialize the individual samplers, with i being the index of the sampler.
- Returns:
The instantiated vector of action samplers
- get_actions(self: city_of_gold.vec.sampler.vec_sampler_6) numpy.ndarray[city_of_gold.ActionData]
Get a reference to the samplers internal vector of sampled actions.
The contents are overwritten every time
sample()is called. :returns: The vector where sampled actions are placed :rtype:numpy.ndarrayofActionData
- sample(self: city_of_gold.vec.sampler.vec_sampler_6, action_mask: numpy.ndarray[city_of_gold.ActionMask]) None
Generate a uniform sample of the valid action space for each environment.
Update the contents of actions with a new sample masked using the input action mask. :param action_mask: mask specifying valid actions for each environment :type action_mask:
numpy.ndarrayofActionMask:return: None
- class city_of_gold.vec.sampler.vec_sampler_64
Bases:
pybind11_objectVectorized random agent for 64 environments
- Parameters:
seed (unsigned integer or None) – (Optional) Set the random generator seed for the sampler. Unique seeds in the form seed+i are used to initialize the individual samplers, with i being the index of the sampler.
- Returns:
The instantiated vector of action samplers
- get_actions(self: city_of_gold.vec.sampler.vec_sampler_64) numpy.ndarray[city_of_gold.ActionData]
Get a reference to the samplers internal vector of sampled actions.
The contents are overwritten every time
sample()is called. :returns: The vector where sampled actions are placed :rtype:numpy.ndarrayofActionData
- sample(self: city_of_gold.vec.sampler.vec_sampler_64, action_mask: numpy.ndarray[city_of_gold.ActionMask]) None
Generate a uniform sample of the valid action space for each environment.
Update the contents of actions with a new sample masked using the input action mask. :param action_mask: mask specifying valid actions for each environment :type action_mask:
numpy.ndarrayofActionMask:return: None
- class city_of_gold.vec.sampler.vec_sampler_7
Bases:
pybind11_objectVectorized random agent for 7 environments
- Parameters:
seed (unsigned integer or None) – (Optional) Set the random generator seed for the sampler. Unique seeds in the form seed+i are used to initialize the individual samplers, with i being the index of the sampler.
- Returns:
The instantiated vector of action samplers
- get_actions(self: city_of_gold.vec.sampler.vec_sampler_7) numpy.ndarray[city_of_gold.ActionData]
Get a reference to the samplers internal vector of sampled actions.
The contents are overwritten every time
sample()is called. :returns: The vector where sampled actions are placed :rtype:numpy.ndarrayofActionData
- sample(self: city_of_gold.vec.sampler.vec_sampler_7, action_mask: numpy.ndarray[city_of_gold.ActionMask]) None
Generate a uniform sample of the valid action space for each environment.
Update the contents of actions with a new sample masked using the input action mask. :param action_mask: mask specifying valid actions for each environment :type action_mask:
numpy.ndarrayofActionMask:return: None
- class city_of_gold.vec.sampler.vec_sampler_8
Bases:
pybind11_objectVectorized random agent for 8 environments
- Parameters:
seed (unsigned integer or None) – (Optional) Set the random generator seed for the sampler. Unique seeds in the form seed+i are used to initialize the individual samplers, with i being the index of the sampler.
- Returns:
The instantiated vector of action samplers
- get_actions(self: city_of_gold.vec.sampler.vec_sampler_8) numpy.ndarray[city_of_gold.ActionData]
Get a reference to the samplers internal vector of sampled actions.
The contents are overwritten every time
sample()is called. :returns: The vector where sampled actions are placed :rtype:numpy.ndarrayofActionData
- sample(self: city_of_gold.vec.sampler.vec_sampler_8, action_mask: numpy.ndarray[city_of_gold.ActionMask]) None
Generate a uniform sample of the valid action space for each environment.
Update the contents of actions with a new sample masked using the input action mask. :param action_mask: mask specifying valid actions for each environment :type action_mask:
numpy.ndarrayofActionMask:return: None