Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nasim/envs/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ def get_action_mask(self):
mask = np.zeros(self.action_space.n, dtype=np.int64)
for a_idx in range(self.action_space.n):
action = self.action_space.get_action(a_idx)
if self.network.host_discovered(action.target):
if self.current_state.host_discovered(action.target):
mask[a_idx] = 1
return mask

Expand Down
2 changes: 1 addition & 1 deletion nasim/scenarios/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def _validate_single_exploit(self, e_name, e):
(f"{e_name}. Exploit target OS is invalid. '{e[u.EXPLOIT_OS]}'."
" Should be None or one of the OS in the os list.")

assert 0 <= e[u.EXPLOIT_PROB] < 1, \
assert 0 <= e[u.EXPLOIT_PROB] <= 1.0, \
(f"{e_name}. Exploit probability, '{e[u.EXPLOIT_PROB]}' not "
"a valid probability")

Expand Down