Skip to content

env.get_action_mask function accesses wrong member#52

Open
DocDriven wants to merge 2 commits intoJjschwartz:masterfrom
DocDriven:master
Open

env.get_action_mask function accesses wrong member#52
DocDriven wants to merge 2 commits intoJjschwartz:masterfrom
DocDriven:master

Conversation

@DocDriven
Copy link

I noticed that calling the 'get_action_mask' function on any environment fails with the error

>>> env.get_action_mask()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/conda/lib/python3.11/site-packages/nasim/envs/environment.py", line 427, in get_action_mask
    if self.network.host_discovered(action.target):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Network' object has no attribute 'host_discovered'

host_discovered is a method of the state class instead of the network class. It is a one-word fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant