Re: [TuxKart-devel] Ideas for AI
Status: Alpha
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2004-06-30 03:39:25
|
Charles Goodwin wrote: > ...so we need a new scheme. ;) 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. Packed into these 16 bits there would be: 1) The compass direction to steer along in order to reach the best racing line in the optimal way from this point. 2) The distance to the nearest powerup that's further down the track and 'reasonably' gettable without deviating wildly from the racing line. 3) The direction to that powerup. Armed with this information, the AI can figure out where to go if they want a powerup, where to go if they want to just drive - and (using the distance metric and the difference between the two directions) whether they really want to go out of their way to collect said powerup. Now - there are some complications. The map changes when a powerup is collected. This change is far-reaching and would result in a ton of complicated realtime calculations. The good direction is sometimes blocked by another kart. There is still a problem with bridges, crossovers, and dynamic things. ---------------------------- 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----- |