Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Help!
#1

Odd Behavior & Limitations In My Top-Down Path-Finding AI

Archive: 3 posts


Hey guys and girls! Sometime ago I began work on a top-down path-finding AI system that could utilize waypoints placed at corners to create a path to the player in an environment with walls and do this constantly when necessary. (By this, I mean at no given time is the AI not pursuing a path to the player when the logic to follow the player is activated.)

The current result is a system which does the job, utilizing as many as three waypoints at a time to create a path to track down the player (https://www.youtube.com/watch?v=qcM80p-ot8k). In the video, however, it's evident that the AI can find a path to the player, but may waver around a bit, stop in place temporarily, or even get stuck on a wall. This is probably caused by the system of small, circular holograms launched at a rapid pace in the four cardinal directions from the enemy and player used to determine which waypoints the enemy should follow.

I'm not sure what I could do, however, to fix this issue of dodgy AI movement. Any tips help.

On a side note, the logic only is effective in blocky, grid-type environments. My main concern is not getting past this limitation, but being able to do so would be nice.
2013-04-20 04:08:00

Author:
BIGGamerer
Posts: 182


Also what are the timers in your logic used for? I am guessing that you have the AI go on .5-second "steps" but this could be your problem, since even after the sensor deactivates, the timer still goes until the end, which would lead it in the wrong direction at times. It would seem better to use a hard toggle:

http://s21.postimg.org/f7mxau6on/image.jpg

First sensor is set to output closeness. Battery is constant 1% power source. Output of OR gate is set to largest value, so when first sensor output drops to 0%, the OR gate's output remains at 1%. When the second sensor fires, since it's always within first sensor's radius, it activates the XOR gate and closes off output to the Motion Recorder and instantly opens the output to the Mover.

Or am I interpreting your logic wrong?
2013-04-23 09:56:00

Author:
vitamin_arrr
Posts: 10


The "steps" thing you're talking about is what I'm using to compensate for the fact the waypoints are not constantly receiving information from the player or enemy, it's only received periodically. If this system is not in place, the enemy would function erratically due to constant fluctuation between true and false outcomes from the enemy's logic. (By information, I'm talking about the invisible circular pieces of hologram that both the player and enemy emit so that the system can accurately determine which waypoints the enemy must follow to reach the player.) A priority system is set in place so that if multiple conditions for following different waypoints are satisfied, which currently will almost always be the case at any given point, then one will override the other.

That piece of logic you're showing me is interesting, but I'm unsure as to how I could apply it to fix my problems. Sounds like I need to explain more.

The ideal system I'd like to have for checking the properties of followable waypoints would be able to, every single frame, classify certain waypoints with certain properties defined by their location relative to the enemy and player and be able to have the enemy follow the appropriate waypoint.

I currently believe that my current AI system is suffering from the inability to accurately classify certain waypoints with certain properties defined by their location relative to the enemy and player. It can do this, but it seems to be unable to do so constantly every single frame. (When I say this, I mean that in one single frame not every single waypoint is being properly assigned a property. The phenomenon is similar to what is seen here (http://youtu.be/8_EjKKGSXus?t=6m49s), where not every square on the board is being properly updated at a set period of time.) Other issues I might not know about may also be present within this system, but I believe that is the main issue with this system.
2013-04-26 23:33:00

Author:
BIGGamerer
Posts: 182


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.