Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Boost Board Game 2020
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ethan Fox
Boost Board Game 2020
Commits
5a0bcc22
Commit
5a0bcc22
authored
4 years ago
by
Ethan Fox
Browse files
Options
Downloads
Patches
Plain Diff
Update README.md to include topological order
parent
6758abc1
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+714
-702
714 additions, 702 deletions
README.md
with
714 additions
and
702 deletions
README.md
+
714
−
702
View file @
5a0bcc22
...
@@ -688,15 +688,27 @@ The following messages may be sent by an engine to a controller:
...
@@ -688,15 +688,27 @@ The following messages may be sent by an engine to a controller:
# Footrace Generator Design
# Footrace Generator Design
The footrace generator necessitated the use of a dynamic programming algorithm rather than a greedy algorithm. If a greedy were used, it would
The design for the footrace generator is as follows:
value the most movement north but would place the piece in situations that require more moves to reach the end.
`findStartingSituationAndFastestMoveSequence(position)`
is the main dynamic programming algorithm.
The code uses
`ONE_LANE_GAME`
and
`TWO_LANE_GAME`
to generate the puzzles. The algorithm is only used for the
`ONE_LANE_GAME`
to generate a path.
*
The footrace generator necessitated the use of a dynamic programming algorithm
rather than a greedy algorithm. If a greedy were used, it would value the most
movement north but would place the piece in situations that require more moves
to reach the end.
*
`findStartingSituationAndFastestMoveSequence(position)`
is the main dynamic
programming algorithm.
*
The code uses
`ONE_LANE_GAME`
and
`TWO_LANE_GAME`
to generate the puzzles.
The algorithm is only used for the
`ONE_LANE_GAME`
to generate a path.
The
`ONE_LANE_GAME`
is then mirrored to make the
`TWO_LANE_GAME`
.
The
`ONE_LANE_GAME`
is then mirrored to make the
`TWO_LANE_GAME`
.
When the dynamic programming algorithm is run, the board contains pawns and towers.
*
When the dynamic programming algorithm is run, the board contains pawns and towers.
*
Each vertex of the DAG is a
`Situation`
. These vertices are added to the DAG using
`selectBetterBackpointer()`
.
Each vertex of the DAG is a
`Situation`
. These vertices are added to the DAG using
`selectBetterBackpointer()`
.
*
Each edge of the DAG is a move. The algorithm finds the move leading to a
`Situation`
in the
`predecessor`
index of
`backpointersTable`
.
Each edge of the DAG is a move. The algorithm finds the move leading to a
`Situation`
in the
`predecessor`
index of
`backpointersTable`
.
*
The topological order is determined by comparing the y values of two
`Situation`
objects.
\ No newline at end of file
If there is a tie, the x values are compared.
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment