Skip to content

Commit 39c7fb3

Browse files
committed
fix duplicate branches in random_game.py
1 parent 755b946 commit 39c7fb3

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

umbi/ats/examples/random_game.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -210,14 +210,10 @@ def random_game(num_states: int, seed: int | None = None) -> SimpleAts:
210210
for action in sorted(actions_at_state[s]):
211211
choice = ats.new_state_choice(state=s)
212212
ats.choice_to_choice_action[choice] = action
213-
214-
# get all branches for this (s, action) pair
213+
# add all branches for this (s, action) pair
215214
branches = delta[s][action]
216-
branches.sort() # sort by target state
217-
218215
for target, prob in branches:
219216
ats.new_choice_branch(choice=choice, target=target, prob=prob)
220-
ats.new_choice_branch(choice=choice, target=target, prob=prob)
221217

222218
build_time = time.time() - build_start
223219
ats.validate()

0 commit comments

Comments
 (0)