Thank you, that was quite helpful and I think it definitely pointed me in the right direction. I see that the types of sensors I am looking for are commonly provided by competition software. I grabbed the latest linux patch I could find in the CIG link you gave me. However, it seems to work with version 1.3.1, not the latest version 1.3.3.
Does anyone know if there is a patch for the latest version floating around somewhere?
I'm looking into what it's going to take to make the fixes myself, but given my unfamiliarity with the project, it looks like a bit more than I bargained for. (Despite the diffs available.) If there is no patch, I may just go back to 1.3.1, so it's not the end of the world if there isn't one.
On 10/08/2012 04:32 AM, James Ihrig wrote:
Greetings,*First some background:*
I am looking to train some neural networks to drive vehicles in Torcs. I
have a TON of questions, hopefully someone can answer at least a few for
me. I've been digging into the code for about a week now and have
amassed plenty of questions. I apologize an advance for the length.
I have found a program that implements HyperNEAT that I would like to
use in conjunction with torcs. This program however is just that, a
program, not a library. So I will be looking to run it as a program
simultaneously with torcs, and have the two processes communicate with
eachother via XML.
To do this, I would like to:
1) Read XML configuration and populate drivers with neural network data.
(One driver per race.)
2) Skip all menu's, and go straight to some default race.
3) Run a race until X time has passed, or Y laps complete.
4) Write results to XML and wait for new configuration to re-populate
drivers with neural network data.
rinse and repeat.
Right now, I'm just trying to see if I can skip the menus and read in
the XML file at an appropriate place. (I see ANN.cpp and ANN.h specify
an loadANN() function, but I don't see the file format specified anywhere.)
Command line mode exists since TORCS 1.3.3, see http://torcs.sourceforge.net/index.php?name=Sections&op=viewarticle&artid=30#c6_7Just open TORCS as usual and configure the race, this will alter the XML, the message means that no human driver is allowed in a command line race (I thought this is straightforward;-) ), so just remove the human driver from the race ("Player" in the standard distribution without adding more players), then it will work.
I have found what looks to be a way to skip the menus. I have tried to
call torcs with
torcs -r $FULL_PATH_TO_SRC/quickrace.xml
and got the message:
Human drivers not allowed in console race, fix race setup.
Which tells me I'm probably on the right track, but I can't find any
documentation on how or what to change to fix the setup.
Beware, on Windows Vista or higher the virtual store might be a bit confusing, but if you pass the right file, it will work.
Also, I have already created a driver that attempts to follow the center*
of the road using a basic tutorial I have found.
My actual questions:*
Is there any UML documentation for the control flow of the program?
No. But various people have drawn some things in the past, have a look at the existing papers (English wikipedia entry, http://sourceforge.net/projects/cig/files/).See http://torcs.sourceforge.net/index.php?name=Sections&op=viewarticle&artid=30#c6_8, basically you can taylor the race state engine to your needs.
What would be the best way to start a race without going through menus?
Is there a good way to restart a race after a race is completed without
I guess no, have a look into the robot tutorial. A module (so, dll) can currently handle up to 10 robots, so to know which one is meant to drive the index is given. You can save something during the shutdown of your module, e.g. see the bt robots distributed with TORCS, they save a "karma" file.
On a race restart, I will need a new ANN, which I can read from a file,
which holds about 100 individual AI's to test. Is there a way I can
track how many I've tested? Is 'index' in Driver::newrace(int index,
tCarElt* car, tSituation *s) something I can use for this? (I can't find
documentation saying what index is.)
No idea, but as well here you could find something: http://sourceforge.net/projects/cig/files/
Are there any pre-existing classes that are good for detecting
environment such as track edges? (range finders?)
If not, is there an easy way to find a track edge to do an intersection
test of my own with?
- English wikipedia entry (TORCS, uppercase)
Any help would be appreciated, even if it's just pointing to new
documentation I haven't yet found.
Hope this helps