Advertisement

path repetition recognition

Started by February 16, 2004 06:08 PM
6 comments, last by Dovyman 20 years, 9 months ago
im finishing up my research project on doing reactive navigation using a fuzzy subsumption system, but im finding that sometimes the bot gets stuck in a "rough" path sequence where it may follow the same circular path over and over again. I can record the bots x and y position at any time, so my question is does anybody have any ideas on recognizing from the coordinates when the bot is engaged in one of these repeating loops?
Record its position and other parts of its state, and see if they are too similiar to a state the robot previously encountered. When is a state too similiar? Maybe use a fuzzy measure of similiarity between states. Also organize the recorded state data to retrieve the states most similiar to the current state quickly.
Advertisement
maybe recognise patterns from its previous path, if a large section of its previous position is the same, do something
some VB source to help you on your way (should be easy to understand and/or modify)

public function find(x1 as integer, y1 as integer, x2() as integer, y2() as integer)
const thr = 20
for z = 0 to iif(ubound(x2()) < ubound(y2()), ubound(x2()), ubound(y2())
s = rtz(x1 - x2(z)) + rtz(y1-y2(z))
if s < thr then
find = 1
exit function
end if
next z
find = 0
end function
function rtz(x as intager) as intager
rtz = iif(x < 0, x, -x)
end function

Simple thing, you know your too close when you are less then thr pixels from two points, adject thr to your choosing and call with x = find(currx,curry, arraywithallxvars(), arraywithallyvars())

Sorry i use too much planetsourcecode.com (thought up this code while reading

Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
quote: Original post by Dovyman
im finishing up my research project on doing reactive navigation using a fuzzy subsumption system


By definition, reactive systems make no use of state history of any form, other than the current state. Thus, to utilise some form of memory to identify inappropriate states goes against the notion of designing a reactive agent. That doesn''t mean you should disregard the idea, but you should look to the design and implementation of your agent first, before trying to hack a solution to a particular situation.

How are you training your agent to learn its state<-->action mapping (agent function)? If you could provide a little more detail as to your training scheme and the specific section of the state space you are having trouble with, we might be able to help.

Cheers,

Timkin
Timkin: yes, I do see your point, so let me explain about how the system works a bit, and maybe you guys can give me some more help!

The robot has seven sensors which find the distance between the robot and the nearest obstacle, these are located at -90 degrees, -45, -20, 0, 20, 45 and 90. (0 being a heading straight ahead of the robot). Each iteration these sensors return their distance values.

These distance values are passed to a fuzzy function called NEAR which is defined for each sensor.

Elsewhere exists a predefined set of fuzzy membership functions for each angle which represent the importance/viability of that direction. The results of NEAR are applied as scaling values to these functions, and then they are all unioned together to get one big function representing all *disallowed* headings.

In parallel to the obstacle calculations are calculations for a desired direction, which is computed as a specific angle by making a line between the current position and the goal node, and then using fuzzy logic to assign a direction (left forward, forward, right forward) to that angle. This is done using some weighted sum operations which can combine either of those three directions in whatever way determined by the angle.

OK, so now you have a fuzzy membership function representing the *disallowed* headings and one representing the *desired* headings. Intersect these two, so we obtain a set of values which are both *allowed* and *desired*.

This final set is defuzzified using a modified centroid algorithm (sort of a combination of centroid and weighted sums designed by someone else to try and overcome some of the downfalls of the other methods for navigation)

The robot is turns by this crisp value and repeats the process.

^^^That is the method in a nutshell, much of that is not my original research, but I can''t find any quantitative data on the methods usefulness, so I have nothing to compare my results with to see if the bot is performing as expected before I move on to the rest of my research.
Advertisement
pdovy: there are a few easy solutions that work really well with reactive systems. See my book (AI Game Development: SCLRB) p. 118-119, I know you have it somewhere .

Alex

Join us in Vienna for the nucl.ai Conference 2015, on July 20-22... Don't miss it!

Certainly take a look at Alex''s book... it''s a great read and he knows what he''s talking about!

The easiest solution taht comes to mind is to add a small amount of noise to your output action. So, instead of turning an angle A, turn an angle A+e, where ''e'' is a small random angle. However, ''e'' will need to be sufficiently large so that over the period of a single loop of identical states, it generates sufficient noise to cause a jump over a decision boundary. In other words, the amount of noise added should be small, so as not to invalidate your fuzzy sets, but it should be large enough that over the number of iterations you find in a typical ''loop'' it generates a different action than on the previous loop. This will stop identical loops. Of course, it will also cause slightly sub-optimal action.

Of course, I personally wouldn''t use fuzzy logic for this problem... I''d use a probabilistic representation of ranges and a data fusion method for integration of range information, since this is a tried, tested and proven method for localisation. But then, that''s just me.

Good luck,

Timkin

This topic is closed to new replies.

Advertisement