aimacode / aima-java

Java implementation of algorithms from Russell And Norvig's "Artificial Intelligence - A Modern Approach"
MIT License
1.56k stars 795 forks source link

BidirectionSearchTest extended to include environments with different actions from adjoining nodes #312

Open ctjoreilly opened 7 years ago

ctjoreilly commented 7 years ago

This is related to the now closed #298. Basically, the BidirectionalSearchTest needs to be extended with tests using an environment that ensure the sequence of actions from start to goal make sense, i.e. in the example if you are in a grid and the actions are left, right, up, down and say you start at the top and bottom and meet in the middle the actions would be something like:

start->meet at = down, down goal->meet at = up up

Simply joining the lists of actions will not work in this scenario (unlike the current Map2D tests). The implementations of BidirectionalSearch need to be tested to ensure they handle this correctly.

globalworming commented 7 years ago

A basic grid-like environment should be easy. I'd say this environment needs walls like http://www.redblobgames.com/pathfinding/tower-defense/ I'll look into that when the monte carlo localization frustrates me again :)

HasinduGajanayake commented 7 years ago

I am working on this enhancement

ctjdev commented 7 years ago

@HasinduGajanayake can you explain me about the enhancement?

HasinduGajanayake commented 7 years ago

Yeah, Its a pleasure to tell you about this enhancement. there is a test class called BidirectionalSearchTest.But its not optimized yet.Think if you are in a grid and the actions are left, right, up, down and say you start at the top and bottom and meet in the middle the actions would be start->meet at = down, down goal->meet at = up up But the thing is simply joining the actions will not work..