-
Notifications
You must be signed in to change notification settings - Fork 168
Implement efficient single-pass subgame root finder to replace the legacy IsSubgameRoot
#664
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
Open
d-kad
wants to merge
18
commits into
gambitproject:master
Choose a base branch
from
d-kad:issue_584
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
3b7ffe9
Refactor the legacy subgame root finder using DSU (Disjoint Set Union…
d-kad eafc248
Add tests following the new path style for nodes and new .efg files
d-kad 9bd1e26
Add missing .efg file
d-kad d3e7172
Delete an outdated subgame roots test in the legacy test suite
d-kad e58f7e9
Refactor Subgame Root Finder: replace IDs with object pointers and im…
d-kad 49bb98e
Refactor the legacy implementation of IsSubgameRoot
d-kad 861beae
Eliminated visited tracking for infosets
d-kad e9ca49b
Refactor: Replace priority queues with indexed arrays
d-kad dd47f40
Consolidate two subgame root tests into a single path-based verification
d-kad aee924d
Refactor the local frontier to be a priority queue
d-kad eeb32ea
Tests updated to reflect trivial game edge case.
d-kad 8beba49
Raise UndefinedException in virtual GetSubgameRoot() in the base clas…
d-kad efe95bc
Replace token-based visited tracking with std::unordered_set; correct…
d-kad 599f41c
Use the post-order iterator in FindSubgameRoots
d-kad 9d68d1f
Tightened tests
d-kad 4f3033d
Apply filter_if, GetPlayersWithChance and GetNonterminalNodes tighten…
d-kad 1216bec
Refactor subgame root finder with NestedElementCollection and filter_if
d-kad f6e1f68
Pre-compute DFS numbers locally within FindSubgameRoots() to eliminat…
d-kad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| EFG 2 R "Untitled Extensive Game" { "Player 1" "Player 2" } | ||
| "" | ||
|
|
||
| p "" 1 1 "" { "1" "2" } 0 | ||
| p "" 1 1 "" { "1" "2" } 0 | ||
| p "" 2 1 "" { "1" "2" } 0 | ||
| t "" 1 "Outcome 1" { 1, -1 } | ||
| t "" 2 "Outcome 2" { 2, -2 } | ||
| p "" 2 3 "" { "1" "2" } 0 | ||
| t "" 3 "Outcome 3" { 3, -3 } | ||
| t "" 4 "Outcome 4" { 4, -4 } | ||
| p "" 2 2 "" { "1" "2" } 0 | ||
| t "" 5 "Outcome 5" { 5, -5 } | ||
| t "" 6 "Outcome 6" { 6, -6 } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| EFG 2 R "Untitled Extensive Game" { "Player 1" "Player 2" } | ||
| "" | ||
|
|
||
| p "" 1 1 "" { "1" "1" } 0 | ||
| t "" 1 "Outcome 1" { 1, -1 } | ||
| p "" 2 1 "" { "1" "1" "1" "1" "1" } 0 | ||
| p "" 1 2 "" { "1" "1" } 0 | ||
| t "" 2 "Outcome 2" { 2, -2 } | ||
| p "" 1 3 "" { "1" "1" } 0 | ||
| t "" 3 "Outcome 3" { 3, -3 } | ||
| t "" 4 "Outcome 4" { 4, -4 } | ||
| p "" 1 3 "" { "1" "1" } 0 | ||
| p "" 1 2 "" { "1" "1" } 0 | ||
| t "" 5 "Outcome 5" { 5, -5 } | ||
| t "" 6 "Outcome 6" { 6, -6 } | ||
| t "" 7 "Outcome 7" { 7, -7 } | ||
| p "" 2 2 "" { "1" "1" } 0 | ||
| t "" 8 "Outcome 8" { 8, -8 } | ||
| p "" 1 4 "" { "1" "1" } 0 | ||
| p "" 2 3 "" { "1" "1" } 0 | ||
| t "" 9 "Outcome 9" { 9, -9 } | ||
| t "" 10 "Outcome 10" { 10, -10 } | ||
| p "" 2 4 "" { "1" "1" } 0 | ||
| t "" 11 "Outcome 11" { 11, -11 } | ||
| p "" 1 5 "" { "1" "1" } 0 | ||
| p "" 1 6 "" { "1" "1" } 0 | ||
| p "" 2 5 "" { "1" "1" } 0 | ||
| t "" 12 "Outcome 12" { 12, -12 } | ||
| t "" 13 "Outcome 13" { 13, -13 } | ||
| t "" 14 "Outcome 14" { 14, -14 } | ||
| p "" 1 6 "" { "1" "1" } 0 | ||
| p "" 2 6 "" { "1" "1" } 0 | ||
| c "" 1 "" { "1" 1/2 "1" 1/2 } 0 | ||
| p "" 2 5 "" { "1" "1" } 0 | ||
| p "" 2 3 "" { "1" "1" } 0 | ||
| t "" 15 "Outcome 15" { 15, -15 } | ||
| t "" 16 "Outcome 16" { 16, -16 } | ||
| t "" 17 "Outcome 17" { 17, -17 } | ||
| p "" 2 5 "" { "1" "1" } 0 | ||
| t "" 18 "Outcome 18" { 18, -18 } | ||
| t "" 19 "Outcome 19" { 19, -19 } | ||
| t "" 20 "Outcome 20" { 20, -20 } | ||
| p "" 2 6 "" { "1" "1" } 0 | ||
| p "" 2 7 "" { "1" "1" } 0 | ||
| t "" 21 "Outcome 21" { 21, -21 } | ||
| t "" 22 "Outcome 22" { 22, -22 } | ||
| p "" 2 7 "" { "1" "1" } 0 | ||
| t "" 23 "Outcome 23" { 23, -23 } | ||
| t "" 24 "Outcome 24" { 24, -24 } | ||
| p "" 1 7 "" { "1" "1" } 0 | ||
| t "" 25 "Outcome 25" { 25, -25 } | ||
| t "" 26 "Outcome 26" { 26, -26 } | ||
| p "" 1 7 "" { "1" "1" } 0 | ||
| t "" 27 "Outcome 27" { 27, -27 } | ||
| t "" 28 "Outcome 28" { 28, -28 } |
File renamed without changes.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.