-
Notifications
You must be signed in to change notification settings - Fork 12
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
Group 1 Wed Sept 27th checkin #21
Conversation
- Added some basic attributes with potential functionality for a_star_search - Added attributes to decribe a specific type of agent
- Added some basic attributes with potential functionality for a_star_search - Added attributes to decribe a specific type of agent
Bringing branch up to date
Descriptions of current Agents implemented
Updated README and file deletion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed and everything checks out!!
Added A* agent
…endent of location outside of user-control (I hope ;-;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall the changes look good. This PR adds A* pathfinding and an agent that uses it to move between multiple waypoints.
Two things we should change before merging:
- Switch the
.h
files to.hpp
to keep things consistent - Similarly, changing
shortest_path
to be more consistent with the rest of the methods. Maybe something likeGetShortestPath
orFindShortestPath
?
source/Agents/AStarAgent.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should figure out what we want to put in the comment block at the top of each file eventually.
… be more uniform and easy to follow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Went through in more detail this time.
There is one critical change left: to remove a circular include. Instructions for how to do that are in one of the review comments.
Thanks for making the other changes earlier!
source/Agents/AgentLibary.hpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The include of WorldBase is unnecessary and creates a circular include. This prevents the code from compiling on my machine. We should remove it.
Fix documentation error for PR 21
source/Agents/AStarAgent.hpp
Outdated
// If the last step failed, or we need a new path the then regenerate the path | ||
if (action_result == 0 || path.empty() || current_move_num > recalculate_after_x_turns) | ||
{ | ||
path = world->ShortestPath(GetPosition(), goal_position); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to know which agent is asking for the shortest path.
Adding PathAgent, support for running Catch2 tests with CMake
Moved GetShortestPath to AgentLib
This PR will add the first external agent of group one. It tracks a path using A* to a given coordinate.
auto my_agent = dynamic_cast<cse491::walle::matt_k_first_agent *>(agent); my_agent->set_word(&world); my_agent->set_goal_position(cse491::GridPosition(1, 8)); my_agent->SetPosition(3, 1);
Will create an agent that goes from position (3,1) to (1,8) While avoiding walls and other un-walkable areas defined by the world.
Future changes: