yawning_titan.envs.specific.core.machines.Machines#

class yawning_titan.envs.specific.core.machines.Machines(n_machines=5, vuln_score_ub=0.8, vuln_score_lb=0.4)[source]#

Bases: object

Class that represents a collection of machines.

Sets the initial state for the machines within the environment and randomly generates vulnerability scores for each machine

Methods

get_initial_state

Get the initial states of the machines.

init_machines

Generate a set of machines state pairs.

init_machines()[source]#

Generate a set of machines state pairs.

Each pair has a vulnerability score between the upper and lower bound values provided and a 0 to denote uncompromised state

Returns:

A list of fresh machine states pairs.

Example

[[0.74,0],[0.47,0],[0.62, 0],[0.52, 0],[0.83,0]]

get_initial_state()[source]#

Get the initial states of the machines.

Returns:

The initial machine states

Notes: This is required in order to ensure that the initial states are saved properly.