Skip to content

Decide on the setup of the seeded episodes #458

@ondrej-lukas

Description

@ondrej-lukas

Current Status

The environment can be started with a starting seed, which is used for setting:

  • Starting state of the random generator of random
    • Impacts starting/goal positions (when keyword random is used)
    • Impacts the global defender decision if used
    • Impacts action success (not used atm)
  • Starting state of the random generator of np.random
    • Not impacting anything AFAIK
  • Starting state of the random generator of Faker
    • Impacts the re-mapping of IPs

Proposed Design

  • Starting seed remains unchanged.
  • When the agent is requesting a reset with ResetGame, there are 2 parameters:
    • seed: int = None
    • change_ips: bool = False

The following table shows the result on the environment (agents 1 & 2 show the behavior when multiple agents are present):

Starting seed A1 seed A1 change_ips A2 seed A2 change_ips Changed seed game Changed seed topology Changed topology
42 1 TRUE 1 TRUE 1 1 TRUE
42 1 TRUE 1 FALSE 1 ??? (NONE) FALSE
42 1 TRUE 2 TRUE NONE NONE ??? (FALSE)
42 1 TRUE 2 FALSE NONE NONE FALSE

This design allows:

  • Seeding every episode and topology change (for testing, consistent evaluation).
  • Setting a custom seed to the random generators and then continuing with it for the rest of the game.
  • Setting a random seed for the game WITHOUT changing the topology (reproducibility within a fixed topology).

It does not allow:

  • Changing the seed of the topology WITHOUT changing the seed of the rest.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions