TORCS WORKS Jang Su-Hyung
Social Network Base Code by Berniw Rule GA Controller by Diego Prerez Stuck Speed limit Distance Accelerator Rule GA Controller by Diego Prerez Input Data Base Individual Rule GA Individual Evolving a Fast Controller for TORCS Using NEAT by Luigi Cardamone NEAT Sensors and Controllers Controller Design Social network define our relationship to others in society. such connections help us define social context, which in turn affects the roles we embody The roles that we play and the social networks that develop around them help us define our individual identity.
Stuck
Stuck
Stuck
Stuck
Stuck
About Speed Limit
About Speed Limit
Distance
Accelerator
Input Data 1 Angle - to Discretization to range: [0,4]
Input Data 2 Track Position -1 to 1 Discretization to range: [0,1]
Input Data 3 Speed 0 to …(km/h) Discretization to range: [0,3]
Input Data 4 Track 19 sensors, from 0 to 100 Discretization to range: [0,3] If any < 20 :1 If any < 100 : 0 Else : 2
Base Individual 1 First approach Angle : [0.4] Track Position : [0,1] Speed : [0,3] Track : [0,2] Each Rule : Steering : [-1.1] Acceleration : [0,1] Gear bound 3000 rpm 6000 rpm
Base Individual 2 First approach Second approach Evolve a GA maximizing the distance raced TORCS did not behave in a stable way Second approach Find the rule set that allows the vehicle to end a lap, centered on the track. Minimize angle to track axis.
Rule GA Individual Rules from base individual compose the GA individual. N rules, depending on base individual. Including left (conditions) and right (actions) sides.
Rule GA Step Create a new rule by genetic operators. Substitute the new one for the most similar in the individual. If fitness decreases, new rule stays. If not, recover the previous one. combination of lap time (40%) and damage (60%).
Sensors and effectors
NeuroEvolution selection cross over mutation Input Hidden Output 1 selection mutation cross over population A B C D Fitness evaluation Search space reproduction Chromosome
NEAT(encoding) NeuroEvoloution of Augmenting Topologies
NEAT(mutation)
NEAT(crossover)
rtNEAT
Sensors and effectors The following sensors were used: Track sensors at -90°,-60°,-30°,+30°,+60°,+90° Frontal sensor: max reading among the frontal track sensors at -10°,0°,10° Car speed The network controls Steering wheel Gas/Brake pedals
Controller design To avoid wasting time with fast but slower controller, we set gas pedal to 1 (the max value) when the car is on a straight In addition, the neural controller does not deal with gear shifting and the scripted policy provided is used instead We also used a very simple scripted policy to avoid at least the opponents that are “close and in front” of the bot
Evaluation of Controllers The fitness is computed on an entire lap as Where Tout is the number of game tics the bot was outside the track Savg is the average speed D is the distance raced As soon as a Tout becomes greater than 500 game tics, the evaluation is immediately stopped
An example of behaviors evolved
Hacked controller Simon M. Lucas Based on SimpleSoloController http://cig.dei.polimi.it/index.php?s=simplesolocontroller Java Low recover ability Over accelerate Target Speed Normal : 100 km/h Safety mode : 50 km/h
Hacked controller Change Target Speed Track Position Limit TrackFac Normal : 250 km/h Safety : 167 km/h Track Position Limit 0.3 -> 0.15 More effort to stay close to the centerline of the track TrackFac 0.38 Steering angle : 0.01 -> 0.005 Reduce the risk of skidding Manually chosen parameter
Homework 1 TORCS 지능형 드라이버 Bot 만들기 바이너리 파일(dll) Source Code 테스트 결과 Presentation 자료 4월 13일 자정까지 neogates@sclab.yonsei.ac.kr
Question