Re: [TuxKart-devel] Ideas for AI
Status: Alpha
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2004-06-30 05:32:56
|
Charles Goodwin wrote: > On Tue, 2004-06-29 at 22:41 -0500, Steve Baker wrote: > >>The thing I'd like to consider is something like a 'vector field'. >> >>A large array (and as I explained earlier - it would be LOTS of memory) >>where for every (say) 2meter x 2meter square there would be (say) two bytes. > > > I really think this is an unecessary approach. [ 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! ] 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. With waypoints, if I somehow get knocked off the road and there is a wall between me and the waypoint, I'm completely stuck. 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. 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. I agree though that it's going to be hard to generate and that it'll consume quite a bit of RAM - so your way may be more practical (I believed that waypoints were the right thing to do when I first wrote TuxKart - but practical experience with trying to kludge around various practical problems leads me to wonder whether something different would help. We can attempt to fix the problems with waypoints by restricting the kinds of tracks we generate - but all of the exciting and interesting possibilities keep tripping up if you impose too many artificial design limitations. ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- |