Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] internal reporting for node.isolated may be incorrect #49

Open
tommypurves opened this issue May 23, 2023 · 1 comment
Open

[BUG] internal reporting for node.isolated may be incorrect #49

tommypurves opened this issue May 23, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@tommypurves
Copy link

Describe the bug
Calling len(list(networkx.isolates(G)) and sum(get_all_isolation()) return different values. This is because when a node is isolated by the blue agent, there is no check for previously connected nodes, and if any nodes that are not the target node have been made isolated.

An extreme example is that isolating the centre node in a star network of N nodes, on the one hand should report all nodes as isolated (as the len(list(networkx.isolates(G)) does), however only one node is reported as isolated internally (the sum of the return for get_all_isolation() method)

To Reproduce
Steps to reproduce the behaviour:
2. Instantiate env = GenericNetworkEnv
3. Print env.network_interface.get_all_isolation() and len(list(networkx.isolates(env.network_interface.current_graph)))
5. See error

Expected behaviour
We would expect that isolating a node, might have the effect of isolating other nodes that are not the target node. However, this is not recorded internally, which might effect proper rewards calculation (e.g. for rewards that are proportional to the number of isolated nodes, or the change in the number of isolated nodes).

Screenshots/Outputs
image
image

The below code should additionally check and set isolated nodes that are not the target node

image

Environment (please complete the following information):
Checked with:

  • [Python 3.9.13]
  • YT Version: [e.g. v1.0.1]
    It might also be a problem in the latest, after scanning the code.
@tommypurves tommypurves added the bug Something isn't working label May 23, 2023
@ChrisMcCarthyDev ChrisMcCarthyDev self-assigned this Jul 21, 2023
@ChrisMcCarthyDev
Copy link
Collaborator

ChrisMcCarthyDev commented Jul 21, 2023

Thank you for raising this. This has been added to our internal backlog (reference 1644) and will be looked into by one of the dev team soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants