yawning_titan.envs.specific.core.machines#

Classes

Machines

Class that represents a collection of machines.

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

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

__init__(n_machines=5, vuln_score_ub=0.8, vuln_score_lb=0.4)[source]#
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.