Re: [TuxKart-devel] Ideas for AI
Status: Alpha
Brought to you by:
sjbaker
From: Aly M. <mer...@ac...> - 2004-06-30 06:19:47
|
On Wed, Jun 30, 2004 at 12:35:13AM -0500, Steve Baker wrote: >=20 > [ I'm playing devils advocate here - I want to discuss this some more > to elicit deeper thinking without necessarily agreeing with everything > I'm saying! ] >=20 > Where a vector field really scores is when the polygonal > representation of the track is very complex. With any kind of > waypoint representation, there is an underlying assumption that you > can't get stuck behind a wall or something. Preventing that from > happening in the absence of other information is really hard. >=20 > With waypoints, if I somehow get knocked off the road and there is a > wall between me and the waypoint, I'm completely stuck. >=20 > Similarly, if I'm somehow pushed off course and ended up somewhere > where there is a shorter route to the waypoint-after-next than going > to the next waypoint - then I'm probably going to mindlesslyy turn > right around, drive to the waypoint that was supposed to be next and > then take the long way to the waypoint after that. >=20 > The vector field approach gives you a fast, reliable way to get out of > any situation. For any location on the map, you know simply and > unambiguously how to get back to the racing line via the fastest > possible route - even if you have to quite literally negotiate a maze > to do it. These are some of the problems I think the "optimum value" decision making algorithm could address. Walls are not things you want to encounter so they radiate a negative value, and if the AI finds itself face to face with a wall, it will notice that turning yields the optimum value. Now this probably wouldn't be as good as a fully tweaked vector map, but I think it would be able to yield a decent racing line. Also, you only need to calculate the values your possible destinations, so making a turn, going forward and going backwards put you at a certain destination and the value of a destination point can be calculated fairly easily. Waypoints would probably work their way in by being points of interest which radiate positive values. Also, if an algorithm like this is what you had in mind for generating the vector field in the first place, then using this approach you would only calculate the vectors you are interested in and you get things like bonuses and enemy car information added in. Whether this outweighs the speed of having a ton of precomputed information available is another matter. Aly |