Code covered by the
LCP(M,q,l,u,x0,display) LCP Solve the Linear Complementarity Problem.
Multi-layer perceptron neural network
do_LCP(M, Ja, Jc, Jf, q, ...
drawFrame(axis, E, xc, in... Draw frame in basic rendering mode without ball image
drawFrame2(axis, E, xc, i... Draw frame in high quality rendering mode with ball image
dynamics(x,v,u,E) initialize basic constants
EXPORT_FIG Exports figures suitable for publication
Precomputes the relationship between cartesian coordinates and
m2c(x,E) Transforms the minimal representation x = [cm; theta] into the cartesian
run_trial(E, NN, gene, x0... Run a trial of the balance and compute performance (gene fitness)
setOpts - a utility function for setting default parameters
simulate(E,S,NN,tex,mask,... Run the simulation - taken from capsim physics engine
View all files
Rate this file
19 Downloads (last 30 days)
File Size: 48.7 KB
File ID: #36911
Machine learning - balancing a stack of balls
29 May 2012
(Updated 27 Jun 2012)
A genetic algorithm is used to train a neural network controller to balance a stack of balls.
Watch this File
A genetic algorithm is used to train a neural network controller to balance a stack of balls by applying a lateral force and a torque to the bottom ball. The capsim physics engine is used to produce a realistic simulation for each attempt. It can learn up to 4 balls.
Cap Sim The Matlab Physics Engine and Export Fig inspired this file.
MATLAB 7.11 (R2010b)
Comments and Ratings (1)
25 Sep 2012
30 May 2012
27 Jun 2012