Git Product home page Git Product logo

Comments (2)

MariaRigaki avatar MariaRigaki commented on May 18, 2024

It seems that when the Gym environment is initialized the following is passed as a winning reward:
winning_reward=5000.0 (line 396 in cyberbattle_env.py). If the agent reaches the goal this is added as a reward overriding the value of the node. This does not happen when you play the interactive game, which returns the string "FLAG: flag discovered!" and just adds the node value which is 1000.

Can someone please confirm that this explanation is correct and it is a matter of just adding 4000 to the final reward to compare the results?

from cyberbattlesim.

blumu avatar blumu commented on May 18, 2024

@MariaRigaki The explanation is correct. The attacker gets the final winning reward if one is specified when the environment is created. The reason why this does not happen in the interactive game is because in notebook_benchmark-chain.ipynb the environment that gets instantiated is CyberBattleToyCtf-v0. This environment is defined in __init__.py as:

register(
    id='CyberBattleToyCtf-v0',
    cyberbattle_env_identifiers=toy_ctf.ENV_IDENTIFIERS,
    entry_point='cyberbattle._env.cyberbattle_toyctf:CyberBattleToyCtf',
    kwargs={'defender_agent': None,
            'attacker_goal': AttackerGoal(own_atleast=6),
            'defender_goal': DefenderGoal(eviction=True)
            },
)

which does not have a winning_reward parameter.

from cyberbattlesim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.