Hi all,
I'm fairly new to JBox2d so please excuse any nativity in my post.
Background:
I am working on an AI project using JBox2D as a physics engine.
I have created a top-down simulation consisting of a two-wheeled "robot" with a simple differential drive. The robot has a number of sensors (not JBox2D sensors) which use ray casting to gather information from the world - e.g closeness of other objects, the edge of the ground etc ..... I have wired up a neural network with inputs to the network coming from these sensors and 2 output neurons which affect the speed and direction of the left and right wheels. I am using genetic algorithms to train my robot to solve a problem. (In this case the problem is for the robot to locate an object - this object is modeled as a JBox2d sensor) and to keep hold of it for as long as possible. My fitness function for now is simply the length of time that that robot "holds" this object.
The problem:
I want training cycles to be as fast as possible as I have a large population trained over a number of epochs. I then want to be able to replay the winning network (robot controller) in a GUI. My question is what is best way to reliably speed up training.
My approach has been to train using a time-step of 1/600 - Training has been successful at this speed with a network that has learned how to locate an object in the world however when I replay this in the UI with a slower time step of 1/60 the results appear to be different.
I have read a number of forum post on determinism but none on determinism with a different time step.
The question:
Should I expect this to work ? - I.e should a simulation run at 1/600 run the same way as a simulation run at 1/60 (albeit at a faster rate) ? I may be smoking my socks on this but if anyone can offer any advice on how I might approach such a problem it would be greatly appreciated.
Massive thanks to everyone involved in this excellent project by the way.
Si
I'm fairly new to JBox2d so please excuse any nativity in my post.
Background:
I am working on an AI project using JBox2D as a physics engine.
I have created a top-down simulation consisting of a two-wheeled "robot" with a simple differential drive. The robot has a number of sensors (not JBox2D sensors) which use ray casting to gather information from the world - e.g closeness of other objects, the edge of the ground etc ..... I have wired up a neural network with inputs to the network coming from these sensors and 2 output neurons which affect the speed and direction of the left and right wheels. I am using genetic algorithms to train my robot to solve a problem. (In this case the problem is for the robot to locate an object - this object is modeled as a JBox2d sensor) and to keep hold of it for as long as possible. My fitness function for now is simply the length of time that that robot "holds" this object.
The problem:
I want training cycles to be as fast as possible as I have a large population trained over a number of epochs. I then want to be able to replay the winning network (robot controller) in a GUI. My question is what is best way to reliably speed up training.
My approach has been to train using a time-step of 1/600 - Training has been successful at this speed with a network that has learned how to locate an object in the world however when I replay this in the UI with a slower time step of 1/60 the results appear to be different.
I have read a number of forum post on determinism but none on determinism with a different time step.
The question:
Should I expect this to work ? - I.e should a simulation run at 1/600 run the same way as a simulation run at 1/60 (albeit at a faster rate) ? I may be smoking my socks on this but if anyone can offer any advice on how I might approach such a problem it would be greatly appreciated.
Massive thanks to everyone involved in this excellent project by the way.
Si