berniw is a car driver for the open racing car simulator, look at torcs.org. at this place i would like to thank the developers of torcs, i had a lot of fun during the development of this driver, they do a great job:-)
gnu general public license 2. anyway, please don't look too hard in the code yet, or my reputation will be lost...;-). download the latest version berniw20020125.tar.bz2 here (it's more recent than the one included in 1.0.0). if you get the CVS version of torcs, you don't need this package, berniw is already included.
- berniw20011225.tar.bz2 for torcs 1.0.0.
- berniw20011103.tar.bz2 for torcs 1.0.0-pre7.
so, first you need a working version of torcs 1.2.0 under linux with sources installed. i
assume in this instructions the following:
you have the permisson on the system to do the needed tasks. the torcs sources are in /usr/src/torcs/torcs and the installation is in
/usr/local/games/torcs. in case you use other directories, just replace this directories with the
ones on your system. i also assume that the berniw20020125.tar.bz2
is in your home directory.
first export the following environment variables (for bash):
export TORCS_BASE=/usr/src/torcs/torcs
export MAKE_DEFAULT=/usr/src/torcs/torcs/Make-default.mk
now change to the drivers directory:
cd $TORCS_BASE/src/drivers
unpack the berniw package (where YYYYMMDD means the version you got, eg. 20011225):
tar xfvI ~/berniwYYYYMMDD.tar.bz2
compile and install:
cd berniw
make
make install
if you discover trouble send me a mail to berni4you@gmx.ch.
run it:
cd /usr/local/games/torcs
./torcs
now choose a berniw, have fun.
- pit stop.
- simple collision avoidance.
- stays quite good on various tracks.
- overtaking.
- let opponents overlap.
- pit speed limiter.
- improvment of letting overlap.
- prepare flag and rule handling (todo is just yellow flag, and perhaps drive through).
- better strategy.
- improve stability (of car, not of the code).
- review the code and choose better names for variables/procedures, improve comments.
- replace quick hacks with serious routines.
- communication between berniw's.
- improve behavior model.
if you are interested, you can tune the setups for the cars. they are in the berniw 1-10 directories, named according to the track. if you have a good one, it's welcome, of course (berni4you@gmx.ch).
- windows port has been supported by my brother michael.
- fixed array index underflow.
- improved gear changing, it uses now enginemaxrpmRedLine instead of enginemaxrpm.
- setups.
- improved overlapping support.
- reduced trajectory footprint, pathfinder.*.
- changed correctpath(), takes now actual car direction to compute trajectory instead of parrallel to the track.
- setups.
- new skin for berniw 2-7.
- basic overlapping support.
- setups.
- berniw 5 changed to gt-40.
- berniw2-7 changed to porsche-gt3.
- skin for berniw 5.
- setups.
- berniw 2-10 changed to 360-modena.
- changed skins of berniw 9 and berniw 2-9.
- some changes in breaking code.
- added pit speed limiter.
- changed some parameters in mycar.cpp to improve starts.
- some setups.
- changed braking code.
- changed overtaking.
- changed ABS from take care of average slip to maximum slip.
- some setups.
- make use of curbs and concrete patches in turns.
- minor performance improvment.
- rearranged some code.
- changed some methods in TrackSegment, to access original data and get rid of local copies. with this i hope to get more cache-hits, because few data is accessed often, and reduce the memory footprint.
- changed some setups.
- improved performance of distToMiddleOnSeg(), distToMiddle().
- changed pathslope() for better connection between spline and track.
- removed connection smoothing.
- fixed one of the "stop and go" bugs in overtake().
- made overtaking more aggressive.
- some setups.
- changed parameter MAXALLOWEDPITCH to fix crazy behaviour on a-speedway (mycar.cpp).
- some changes in steer code (berniw.cpp).
- changed overtaking, tried to compensate "noise" from interpolation.
- some setups.
- some old stuff removed and small changes in overtake code.
- minor change in overtaking code.
- minor cleanups.
- commited windows port.
- fixed bug #554910 (hopefully...).
- added "anti fly code".
- merged with torcs 1.1, eg. no frontwing anymore, etc.
- added some updates for efficiency.
- changed berniw 3 to porsche-gt1.
- fixed a minor bug in my aerodynamics stuff.
- experimental windows port.
- ...
- continued cleanups, introduced linalg.h to put vector stuff into it. messed a bit around with overtaking and breaking code.
- starting major cleanups in mycar.h, mycar.cpp.
- bugfix in collision(), minor changes.
- little overtaking code change, which should avoid some obiously bad overtaking attempts.
- minor changes and cleanups.
- minor cleanups (comments, regrouped some code, ...).
- tried things out (speed dependent margins, ...), improved overtake().
- did some testing, races are with new overtake more spectacular, so the show improves;-).
- texture for viper.
- setups for acura-nsx and viper on e-track-4.
- improved and changed overtake() a bit.
- setups for acura-nsx and viper on e-track-1.
- tried to improve overtaking and breaking, try it out.
- reworked some code, later a merge of overtake() and collision () has to be done for efficiency.
- added a viper (berniw 4), setups and texture are not done.
- added an acura-nsx (berniw 3), setups and texture not done.
- minor code cleanups.
- Eric released torcs 1.0.0. hurray:-).
- just played a bit with the setups of my cars.
- added defines in pathfinder.h. you can now choose the trajectory on compile time through defining PATH_K1999 or PATH_BERNIW. if you choose none, the driver will drive on the midde of the track. if you choose both, first a berniw path is generated, then a K1999 optimisation is performed. the reason for having two path's handy is, that you can check, if an idea is "in general" good, and not just on one path.
- added support to take care of bumps (ala dirt-2).
- hopefully fixed the SIGSEGV bug.
- fixed a potential bug (never appeared in tests:-)).
- cleanups.
- performance improvements.
- newlines at *.cpp, *.h files, strange, my gcc 2.95.3 didn't complain?!.
- make all ready to deploy to cvs.
- added path finding from Remi Coulom, K1999.cpp, (c) by Remi Coulom.
- make all ready to deploy to cvs.
- simple overtaking.
- setups for berniw 9, so it stays on every track.
- little strategy (refueling: laps behind leader) change in berniw.cpp.
- finished setups for eroad, e-track-4.
- setups for berniw 1-9, eroad, e-track-4.
- textures for berniw 6-8.
- handling of rwd, fwd and 4wd.
- moved some code.
- moved berniw 10 into a buggy.
- moved berniw 9 into a mc-laren-f1.
- moved berniw 8 into a corvette.
- moved berniw 7 into a lotus-gt1.
- moved berniw 6 into a 155-DTM.
- new setups for berniw 1-5 (brake balance).
- cleaned up old stuff.
- added some trajectory code (not used yet).
- bug hunting, reporting.
- berniw becomes integrated into the torcs CVS:-).
1. the opponent needs to be nearer (e. g. distance < 50m) than a certain threshold, then a timer gets started.
2. if the distance becomes again greater than a threshold (e. g. distance > 80m), then the timer is reset to zero.
3. if the opponent is nearer than another threshold (e. g. distance < 15m) and the timer value is greater than e. g. 10s, let him pass.