Re: Looking for some advice an creating and training a new AI in torcs.
Daniele Loiacono <[email protected]> Tue, 9 Oct 2012 09:31:55 +0200
| Newsgroups | gmane.games.torcs.devel |
|---|---|
| Message-ID | <CAKdQfvpRJKdKvxD5O77Sjs=s08HOm_UCo6FMbo9+mpKQCcDtbA@mail.gmail.com> |
--===============4972396881156530383== Content-Type: multipart/alternative; boundary=14dae93407472069cd04cb9b555e --14dae93407472069cd04cb9b555e Content-Type: text/plain; charset=ISO-8859-1 Dear James, unfortunately at the moment we are not supporting TORCS 1.3.3 yet. We are thinking to move to TORCS 1.3.3 for the next championship, but right now we did not take a final decision about that. By the way, if we will update the competition software to support TORCS 1.3.3 it should not affect the current API from the client side. Accordingly, if you start working with the competition software right now on TORCS 1.3.1 and, at some point, we will switch to TORCS 1.3.3, we expect the change to be completely transparent to you (apart from the need to re-install a different version of TORCS). Hope it helps. Best, Daniele PS. If you are interested in the competition, I will recommend you to stay tuned on http://www.geccocompetitions.com/ (we will announce all the news about competitions there... including the Simulated Car Racing). On Tue, Oct 9, 2012 at 4:08 AM, James Ihrig <[email protected]> wrote: > 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. > > http://sourceforge.net/projects/cig/files/SCR%20Championship/ > > 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. > > -Jim > > > On Mon, Oct 8, 2012 at 1:22 AM, Bernhard Wymann <[email protected]> wrote: > >> Hi Jim >> >> >> On 10/08/2012 04:32 AM, James Ihrig wrote: >> >>> Greetings, >>> >>> 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. >>> >>> *First some background:* >>> >>> >>> 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_7<http://torcs.sourceforge.net/index.php?name=Sections&op=viewarticle&artid=30#c6_7> >> >> >> >>> 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. >>> >> >> Just 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. >> >> 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/ <http://sourceforge.net/projects/cig/files/>). >> >> >> 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 >>> menus? >>> >> >> See http://torcs.sourceforge.net/**index.php?name=Sections&op=** >> viewarticle&artid=30#c6_8<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. >> >> >> 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.) >>> >> >> 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. >> >> >> Are there any pre-existing classes that are good for detecting >>> environment such as track edges? (range finders?) >>> http://www.youtube.com/watch?**v=FKAULFV8tXw&feature=related<http://www.youtube.com/watch?v=FKAULFV8tXw&feature=related> >>> >>> If not, is there an easy way to find a track edge to do an intersection >>> test of my own with? >>> >> >> No idea, but as well here you could find something: >> http://sourceforge.net/**projects/cig/files/<http://sourceforge.net/projects/cig/files/> >> >> >> Any help would be appreciated, even if it's just pointing to new >>> documentation I haven't yet found. >>> >> >> - English wikipedia entry (TORCS, uppercase) >> - http://sourceforge.net/**projects/cig/files/<http://sourceforge.net/projects/cig/files/> >> - http://cig.dei.polimi.it/ >> - http://games.ws.dei.polimi.it/**competitions/scr/<http://games.ws.dei.polimi.it/competitions/scr/> >> >> Hope this helps >> >> Best regards >> >> Bernhard >> > > > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > Torcs-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/torcs-devel > > --14dae93407472069cd04cb9b555e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Dear James,<div><br></div><div>unfortunately at the moment we are not suppo= rting TORCS 1.3.3 yet.</div><div><br></div><div>We are thinking to move to = TORCS 1.3.3 for the next championship, but right now we did not take a fina= l decision about that.</div> <div>By the way, if we will update the competition software to support TORC= S 1.3.3 it should not affect the current API from the client side.</div><di= v>Accordingly, if you start working with the competition software right now= on TORCS 1.3.1 and, at some point, we will switch to TORCS 1.3.3, we expec= t the change to be completely transparent to you (apart from the need to re= -install a different version of TORCS).</div> <div><br></div><div>Hope it helps.</div><div>Best,</div><div>Daniele</div><= div><br></div><div>PS. If you are interested in the competition, I will rec= ommend you to stay tuned on=A0<a href=3D"http://www.geccocompetitions.com/"= >http://www.geccocompetitions.com/</a>=A0(we will announce all the news abo= ut competitions there... including the Simulated Car Racing).</div> <div><br></div><div><br><br><div class=3D"gmail_quote">On Tue, Oct 9, 2012 = at 4:08 AM, James Ihrig <span dir=3D"ltr"><<a href=3D"mailto:jeihrig@gma= il.com" target=3D"_blank">[email protected]</a>></span> wrote:<br><block= quote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc= solid;padding-left:1ex"> Thank you, that was quite helpful and I think it definitely pointed me in t= he right direction. I see that the types of sensors I am looking for are co= mmonly 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 ver= sion 1.3.1, not the latest version 1.3.3.<br> <br><a href=3D"http://sourceforge.net/projects/cig/files/SCR%20Championship= /" target=3D"_blank">http://sourceforge.net/projects/cig/files/SCR%20Champi= onship/</a><br><br>Does anyone know if there is a patch for the latest vers= ion floating around somewhere?<br> <br>I'm looking into what it's going to take to make the fixes myse= lf, but given my unfamiliarity with the project, it looks like a bit more t= han 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 i= sn't one.<br> <br>-Jim<div class=3D"HOEnZb"><div class=3D"h5"><br><br><div class=3D"gmail= _quote">On Mon, Oct 8, 2012 at 1:22 AM, Bernhard Wymann <span dir=3D"ltr">&= lt;<a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]= </a>></span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> Hi Jim<div><br> <br> On 10/08/2012 04:32 AM, James Ihrig wrote:<br> </div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-l= eft:1px #ccc solid;padding-left:1ex"><div> Greetings,<br> <br> I am looking to train some neural networks to drive vehicles in Torcs. I<br= > have a TON of questions, hopefully someone can answer at least a few for<br= > me. I've been digging into the code for about a week now and have<br> amassed plenty of questions. I apologize an advance for the length.<br> <br></div> *First some background:*<div><br> <br> I have found a program that implements HyperNEAT that I would like to<br> use in conjunction with torcs. This program however is just that, a<br> program, not a library. So I will be looking to run it as a program<br> simultaneously with torcs, and have the two processes communicate with<br> eachother via XML.<br> <br> To do this, I would like to:<br> <br> 1) Read XML configuration and populate drivers with neural network data.<br= > (One driver per race.)<br> 2) Skip all menu's, and go straight to some default race.<br> 3) Run a race until X time has passed, or Y laps complete.<br> 4) Write results to XML and wait for new configuration to re-populate<br> drivers with neural network data.<br> <br> rinse and repeat.<br> <br> Right now, I'm just trying to see if I can skip the menus and read in<b= r> the XML file at an appropriate place. (I see ANN.cpp and ANN.h specify<br> an loadANN() function, but I don't see the file format specified anywhe= re.)<br> </div></blockquote> <br> Command line mode exists since TORCS 1.3.3, see <a href=3D"http://torcs.sou= rceforge.net/index.php?name=3DSections&op=3Dviewarticle&artid=3D30#= c6_7" target=3D"_blank">http://torcs.sourceforge.net/<u></u>index.php?name= =3DSections&op=3D<u></u>viewarticle&artid=3D30#c6_7</a><div> <br> <br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> <br> I have found what looks to be a way to skip the menus. I have tried to<br> call torcs with<br> torcs -r $FULL_PATH_TO_SRC/quickrace.<u></u>xml<br> and got the message:<br> Human drivers not allowed in console race, fix race setup.<br> Which tells me I'm probably on the right track, but I can't find an= y<br> documentation on how or what to change to fix the setup.<br> </blockquote> <br></div> Just open TORCS as usual and configure the race, this will alter the XML, t= he 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 mo= re players), then it will work.<br> <br> Beware, on Windows Vista or higher the virtual store might be a bit confusi= ng, but if you pass the right file, it will work.<br> <br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"><div> Also, I have already created a driver that attempts to follow the center<br= > of the road using a basic tutorial I have found.<br></div> *<br> My actual questions:*<div><br> Is there any UML documentation for the control flow of the program?<br> </div></blockquote> <br> No. But various people have drawn some things in the past, have a look at t= he existing papers (English wikipedia entry, <a href=3D"http://sourceforge.= net/projects/cig/files/" target=3D"_blank">http://sourceforge.net/<u></u>pr= ojects/cig/files/</a>).<div> <br> <br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> What would be the best way to start a race without going through menus?<br> <br> Is there a good way to restart a race after a race is completed without<br> menus?<br> </blockquote> <br></div> See <a href=3D"http://torcs.sourceforge.net/index.php?name=3DSections&o= p=3Dviewarticle&artid=3D30#c6_8" target=3D"_blank">http://torcs.sourcef= orge.net/<u></u>index.php?name=3DSections&op=3D<u></u>viewarticle&a= rtid=3D30#c6_8</a>, basically you can taylor the race state engine to your = needs.<div> <br> <br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> On a race restart, I will need a new ANN, which I can read from a file,<br> which holds about 100 individual AI's to test. Is there a way I can<br> track how many I've tested? Is 'index' in Driver::newrace(int i= ndex,<br> tCarElt* car, tSituation *s) something I can use for this? (I can't fin= d<br> documentation saying what index is.)<br> </blockquote> <br></div> I guess no, have a look into the robot tutorial. A module (so, dll) can cur= rently handle up to 10 robots, so to know which one is meant to drive the i= ndex 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.<div> <br> <br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> Are there any pre-existing classes that are good for detecting<br> environment such as track edges? (range finders?)<br> <a href=3D"http://www.youtube.com/watch?v=3DFKAULFV8tXw&feature=3Drelat= ed" target=3D"_blank">http://www.youtube.com/watch?<u></u>v=3DFKAULFV8tXw&a= mp;feature=3Drelated</a><br> <br> If not, is there an easy way to find a track edge to do an intersection<br> test of my own with?<br> </blockquote> <br></div> No idea, but as well here you could find something: <a href=3D"http://sourc= eforge.net/projects/cig/files/" target=3D"_blank">http://sourceforge.net/<u= ></u>projects/cig/files/</a><div><br> <br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> Any help would be appreciated, even if it's just pointing to new<br> documentation I haven't yet found.<br> </blockquote> <br></div> - English wikipedia entry (TORCS, uppercase)<br> - <a href=3D"http://sourceforge.net/projects/cig/files/" target=3D"_blank">= http://sourceforge.net/<u></u>projects/cig/files/</a><br> - <a href=3D"http://cig.dei.polimi.it/" target=3D"_blank">http://cig.dei.po= limi.it/</a><br> - <a href=3D"http://games.ws.dei.polimi.it/competitions/scr/" target=3D"_bl= ank">http://games.ws.dei.polimi.it/<u></u>competitions/scr/</a><br> <br> Hope this helps<br> <br> Best regards<span><font color=3D"#888888"><br> <br> Bernhard<br> </font></span></blockquote></div><br> </div></div><br>-----------------------------------------------------------= -------------------<br> Don't let slow site performance ruin your business. Deploy New Relic AP= M<br> Deploy New Relic app performance management and know exactly<br> what is happening inside your Ruby, Python, PHP, Java, and .NET app<br> Try New Relic at no cost today and get our sweet Data Nerd shirt too!<br> <a href=3D"http://p.sf.net/sfu/newrelic-dev2dev" target=3D"_blank">http://p= .sf.net/sfu/newrelic-dev2dev</a><br>_______________________________________= ________<br> Torcs-devel mailing list<br> <a href=3D"mailto:[email protected]">[email protected]= ceforge.net</a><br> <a href=3D"https://lists.sourceforge.net/lists/listinfo/torcs-devel" target= =3D"_blank">https://lists.sourceforge.net/lists/listinfo/torcs-devel</a><br= > <br></blockquote></div><br></div> --14dae93407472069cd04cb9b555e-- --===============4972396881156530383== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev --===============4972396881156530383== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Torcs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/torcs-devel --===============4972396881156530383==--