Judo Trainer
Here is my latest attempt at uke AI.
This version uses an opening book for the first move. After the first move, uke uses 22 binary decision trees to determine joint states. The decision tree was generated using information theory for determining optimum splitting. The depth of the tree in this version is 4.
The decision tree looks something like this (this is just one branch):
s=get_body_info(pnum,1).pos.z
if s>1.70032189039 then
vx,vy,vz=get_body_linear_vel(pnum,19)
s=vx
if s>-0.0294268976409 then
avx,avy,avz=get_body_angular_vel(pnum,17)
s=avx
if s>0.185400862924 then
vx,vy,vz=get_body_linear_vel(pnum,3)
s=vx
s=0.2*s+get_body_info(pnum,3).pos.x
if s>1.31438203564 then
set_joint_state(pnum, 1, 2)
else
set_joint_state(pnum, 1, 1)
end