The following warnings occurred:
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 94 errorHandler->error
/showthread.php 28 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 573 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 573 errorHandler->error
/showthread.php 28 require_once
Warning [2] Undefined variable $can_access_moderationqueue - Line: 752 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 752 errorHandler->error
/showthread.php 28 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 892 errorHandler->error
/showthread.php 28 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 892 errorHandler->error
/showthread.php 28 require_once
Warning [2] Undefined variable $awaitingusers - Line: 34 - File: global.php(959) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(959) : eval()'d code 34 errorHandler->error
/global.php 959 eval
/showthread.php 28 require_once
Warning [2] Undefined array key "style" - Line: 1024 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 1024 errorHandler->error
/showthread.php 28 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5308 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5308 errorHandler->error
/global.php 1024 build_theme_select
/showthread.php 28 require_once
Warning [2] Undefined array key 1 - Line: 1474 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1474 errorHandler->error
/inc/functions.php 1429 fetch_forum_permissions
/showthread.php 103 forum_permissions
Warning [2] Undefined array key 1 - Line: 1474 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1474 errorHandler->error
/inc/functions.php 1439 fetch_forum_permissions
/inc/functions.php 3077 forum_permissions
/showthread.php 661 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1474 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1474 errorHandler->error
/inc/functions.php 1439 fetch_forum_permissions
/inc/functions.php 3077 forum_permissions
/showthread.php 661 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1474 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1474 errorHandler->error
/inc/functions.php 1439 fetch_forum_permissions
/inc/functions.php 3077 forum_permissions
/showthread.php 661 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1474 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1474 errorHandler->error
/inc/functions.php 1439 fetch_forum_permissions
/inc/functions.php 3077 forum_permissions
/showthread.php 661 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1474 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1474 errorHandler->error
/inc/functions.php 1439 fetch_forum_permissions
/inc/functions.php 3077 forum_permissions
/showthread.php 661 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1474 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1474 errorHandler->error
/inc/functions.php 1439 fetch_forum_permissions
/inc/functions.php 3077 forum_permissions
/showthread.php 661 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1474 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1474 errorHandler->error
/inc/functions.php 1439 fetch_forum_permissions
/inc/functions.php 3077 forum_permissions
/showthread.php 661 build_forum_jump
Warning [2] Undefined array key "mybb" - Line: 2121 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 2121 errorHandler->error
/inc/functions_indicators.php 41 my_set_array_cookie
/showthread.php 669 mark_thread_read
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(484) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php(484) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 484 eval
/showthread.php 1126 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 672 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 672 errorHandler->error
/showthread.php 1126 build_postbit
Warning [2] Undefined array key "showimages" - Line: 768 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 768 errorHandler->error
/showthread.php 1126 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 773 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 773 errorHandler->error
/showthread.php 1126 build_postbit
Warning [2] Undefined array key "posttime" - Line: 9 - File: inc/functions_post.php(906) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php(906) : eval()'d code 9 errorHandler->error
/inc/functions_post.php 906 eval
/showthread.php 1126 build_postbit
Warning [2] Undefined array key "avatar_padding" - Line: 19 - File: inc/functions_post.php(906) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php(906) : eval()'d code 19 errorHandler->error
/inc/functions_post.php 906 eval
/showthread.php 1126 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(484) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php(484) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 484 eval
/showthread.php 1126 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 672 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 672 errorHandler->error
/showthread.php 1126 build_postbit
Warning [2] Undefined array key "showimages" - Line: 768 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 768 errorHandler->error
/showthread.php 1126 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 773 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 773 errorHandler->error
/showthread.php 1126 build_postbit
Warning [2] Undefined array key "posttime" - Line: 9 - File: inc/functions_post.php(906) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php(906) : eval()'d code 9 errorHandler->error
/inc/functions_post.php 906 eval
/showthread.php 1126 build_postbit
Warning [2] Undefined array key "avatar_padding" - Line: 19 - File: inc/functions_post.php(906) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php(906) : eval()'d code 19 errorHandler->error
/inc/functions_post.php 906 eval
/showthread.php 1126 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(484) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php(484) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 484 eval
/showthread.php 1126 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 672 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 672 errorHandler->error
/showthread.php 1126 build_postbit
Warning [2] Undefined array key "showimages" - Line: 768 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 768 errorHandler->error
/showthread.php 1126 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 773 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 773 errorHandler->error
/showthread.php 1126 build_postbit
Warning [2] Undefined array key "posttime" - Line: 9 - File: inc/functions_post.php(906) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php(906) : eval()'d code 9 errorHandler->error
/inc/functions_post.php 906 eval
/showthread.php 1126 build_postbit
Warning [2] Undefined array key "avatar_padding" - Line: 19 - File: inc/functions_post.php(906) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php(906) : eval()'d code 19 errorHandler->error
/inc/functions_post.php 906 eval
/showthread.php 1126 build_postbit
Warning [2] Undefined array key "invisible" - Line: 1568 - File: showthread.php PHP 8.1.27 (Linux)
File Line Function
/showthread.php 1568 errorHandler->error
Warning [2] Undefined variable $threadnotesbox - Line: 33 - File: showthread.php(1600) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/showthread.php(1600) : eval()'d code 33 errorHandler->error
/showthread.php 1600 eval
Warning [2] Undefined variable $addremovesubscription - Line: 82 - File: showthread.php(1600) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/showthread.php(1600) : eval()'d code 82 errorHandler->error
/showthread.php 1600 eval
Warning [2] Undefined variable $thread_deleted - Line: 104 - File: showthread.php(1600) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/showthread.php(1600) : eval()'d code 104 errorHandler->error
/showthread.php 1600 eval




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
An API for AI Drivers
07-26-2006, 09:55 PM,
#1
An API for AI Drivers
This is something I've been thinking about for a long while. I know its not on the priority list for VDrift, but I'd like to outline here why I feel it perhaps should be, and then to look at some issues to be considered in how it would be designed and implemented.

The most obvious benefit of AI drivers would be that you have someone to race against. Sure, there's multiplayer but my experience with many games is that for every person who'll go online there's 10 who won't. Driving solo around a track is fun ... but driving against a dozen opponents is a lot more fun!

Very good AI drivers already exist in Torcs and RARS and depending on the design of the API they could be ported to VDrift rather than needing to be written from scratch - which brings me to the question of implementation.

Both Torcs and RARS used C/C++ for the AI drivers, whereas it was mentioned earlier here that perhaps a scripting language like LUA could be used. I have no preference one way or the other, but there's a few issues a scripted solution would need to address.

First is performance - would the game slow to a crawl with multiple AI cars driving at the same time?

Secondly, persistent data storage - at initialization stage an AI driver needs to analyze the track, calculate the ideal racing line and braking distances etc then store it in arrays for reference while actually driving, plus information about what its doing while driving so that it remembers who its overtaking & so on. Would a scripted solution allow such data to be retained?

Third, but perhaps not as important, is the ease of porting the drivers from the other games to VDrift if the language is significantly different.

The actual API would be pretty straightforward in concept. Every iteration of the game's process loop the drivers' code would be called via an update function. The API would provide the driver code with comprehensive information about the state of all cars on the track (their location, speed, yaw, yaw-rate, accel rate, damage; the type of track segment they're on including curve type, radius, height changes, banking etc - the list goes on). From this the driver AI can populate variables saying what gear it'd like to use, what amount of clutch, brake, accelerator and of course steering. This is passed back to the game.

I really feel that this'd be a significant enhancement to the game. Although I've developed AI drivers myself for some time I don't feel qualified to create the API as I know nothing about VDrift's internals. It'd need someone who knows VDrift in depth to decide what information is available to put in the API and how best to do so.

Anyway, I hope this has stirred interest in the idea & please forgive the length of this post Smile

regards,
locus
Reply
07-26-2006, 11:24 PM,
#2
 
I'm for AI. The more I think about it, it will be difficult for us to develop any kind of career game modes without someone to race against. Server-driven multiplayer tournaments would of course be very nice as well. However a single-player race really does require some sort of artificial intelligence, and network games with small groups of people also usually benefit from it.

The big problem is all the work it will take to do...but it's not too much, we just have to prepare for it. I have just created a new branch to do some much needed code cleanup work. During this process I'll be thinking about ways to facilitate setting up some kind of "autocar" interface class that can be used to script players.

If you have any ideas about how the interface should talk to the players, describe them as best you can. What functions should be provided, what kind of information should be available, etc.?
Reply
07-26-2006, 11:44 PM,
#3
 
Firstly I'd look at the functions each AI would need to provide for the program to call...

1. A function at the start of each race - lets call it NewRace(). This provides the AI with the identity of the track, the list of opponent cars etc and gives it the opportunity to do the analysis of the track & initialize any other data it might need.

2. A function that's called during the race called Drive(). The AI is given a structure in which they fill in values for gear, clutch, acceleration, brake and steering.

3. A function for when the car stops in the pits called PitCommand(). The AI is given a structure to fill in the amount of fuel to add and damage to repair (assuming VDrift has damage at that point).

4. A function at the end of the race called EndRace(), during which the AI frees any memory/objects it may have allocated.

Going the other way, the AI would need access to data structures describing the track in detail - every curve, every elevation change etc. Ideally this would be in the form of a linked list, with each element describing the type of track segment, its length, precise height information for each side of the track, if a corner then the radius & arc. I know VDrift would need to work out this information previously from its evaluation of the track's 3D model, and this could be a significant challenge, but its essential as unlike a human driver, AIs don't have eyes Smile

The AIs would also need a structure for each car (including its own) containing the exact position of the 4 corners of the car on the track (or off it), its speed both frontal and sideways, its gear, its acceleration rate (negative if braking), its yaw relative to the direction of track its on, its yaw rate, the engine's revs, the slip rate of each wheel ... probably a few other things I'm forgetting. This information is needed for opponent cars so the AI can calculate overtaking and collision avoidance.

They'd also need to know about the setup of the car - how hard the suspension is, what the wing angles are and so on. This is necessary for planning the speed at which it tries to handle corners.

Finally information about the race itself. How many laps elapsed from how many in total, the position and time gaps between each car etc.

These structures would be created anew for each call to the functions for each AI. This is necessary else a malicious AI could perhaps write misleading info to the structures and thus trick other AIs into doing stupid things Smile

That's all I can think of offhand, though I know there's doubtless more.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)