You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The below code should additionally check and set isolated nodes that are not the target node
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.
The text was updated successfully, but these errors were encountered:
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](https://private-user-images.githubusercontent.com/122469750/240324763-1c460765-dd2c-424c-ad09-8fbaea92b750.png?jwt=eyJh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FXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzA0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcwNFQxMzUxMThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jZmY4NmZjMGUxMGUzMGQ0ZGQ1ODk4OThjY2Y0N2IxNmY5MjFmM2ZhOThkMmIyMWQ0NmUxMDk3MzkyZTgyNWZhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.3O_BDVaIZdpijnZIRk19eoN_CYe4lSqzjU5Z_P1VJvw)
The below code should additionally check and set isolated nodes that are not the target node
Environment (please complete the following information):
Checked with:
It might also be a problem in the latest, after scanning the code.
The text was updated successfully, but these errors were encountered: