Notes for the Lifebox, the Seashell, and the Soul - Rudy Rucker
Notes for the Lifebox, the Seashell, and the Soul - Rudy Rucker
Notes for the Lifebox, the Seashell, and the Soul - Rudy Rucker
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Notes</strong> <strong>for</strong> The <strong>Lifebox</strong>, <strong>the</strong> <strong>Seashell</strong>, <strong>and</strong> <strong>the</strong> <strong>Soul</strong>, by <strong>Rudy</strong> <strong>Rucker</strong><br />
Back-propagation Momentum Term<br />
As I mentioned in passing in <strong>the</strong> last chapter, when training a neural net, we also<br />
avoid getting stuck on local maxima by using a so-called momentum term which keeps us<br />
moving <strong>for</strong>ward through <strong>the</strong> fitness l<strong>and</strong>scape even when a maximum is found. If no better<br />
maximum occurs nearby, <strong>the</strong> momentum peters out <strong>and</strong> <strong>the</strong> search circles back.<br />
Game AI<br />
There’s a variety of ways one might approach this kind of problem. The so-called<br />
expert system approach is to analyze how a good football player avoids tacklers ⎯ when to<br />
fake, when to speed up, when to slow down, when to double back, <strong>and</strong> so on. With enough<br />
trial <strong>and</strong> error, you can code up an intricate reflex schema as a series of if-<strong>the</strong>n rules, perhaps<br />
of <strong>the</strong> <strong>for</strong>m:<br />
if Condition1 <strong>the</strong>n do Action1;<br />
if Condition2 <strong>the</strong>n do Action2;<br />
if Condition3 <strong>the</strong>n do Action3;<br />
if Condition4 <strong>the</strong>n do Action4;<br />
...<br />
if Condition5 <strong>the</strong>n do Action5;<br />
With sufficient care, you could make <strong>the</strong> conditions both mutually exclusive <strong>and</strong><br />
complete ⎯ that is, you could define <strong>the</strong> conditions so that at any given time exactly one of<br />
<strong>the</strong>m would hold. But this isn’t always <strong>the</strong> best way to go. At some point it might be<br />
although Condition1 is true, Condition2 is very nearly true, so that <strong>the</strong> best thing might be<br />
to mix a bit of reaction Action2 in with your reaction Action1.<br />
How would I mix two actions? Some kinds of actions lend <strong>the</strong>mselves to being<br />
mixed. If Action1 is to turn left by ten degrees, <strong>and</strong> Action2 is to turn left by thirty degrees,<br />
<strong>the</strong>n one might possibly combine <strong>the</strong> two by turning left twenty degrees. But this could be a<br />
mistake. If, say, Action1 is to turn left ten degrees <strong>and</strong> Action2 is to turn right ten degrees,<br />
does combining <strong>the</strong>m mean that you shouldn’t turn at all? In some situations this might be<br />
exactly <strong>the</strong> wrong move. A different way to combine actions is probabilistically, as if by<br />
rolling weighted die. This is in fact <strong>the</strong> only option if <strong>the</strong> actions are incompatible, as when,<br />
<strong>for</strong> instance, Action1 is passing <strong>the</strong> ball <strong>and</strong> Action2 means kicking <strong>the</strong> ball.<br />
To implement a mixed approach of any kind, ra<strong>the</strong>r than assuming that each condition<br />
is definitely true or false, we can instead give <strong>the</strong> truth of each condition a weight between 0<br />
<strong>and</strong> 1. 0 is false, 1 is true, 0.2 is almost false, 0.9 is very nearly true, <strong>and</strong> so on.<br />
This sounds nebulous, but we can make it precise. Suppose, <strong>for</strong> instance, Condition<br />
expresses <strong>the</strong> notion “<strong>the</strong> left guard is too close to me”. If I let distance st<strong>and</strong> <strong>for</strong> <strong>the</strong><br />
distance between me <strong>and</strong> <strong>the</strong> opposing team’s left guard, <strong>the</strong>n I might be com<strong>for</strong>table in<br />
giving Condition a value of 0 if distance is greater than 10 yards, <strong>and</strong> giving Condition a<br />
value of 1 if distance is less than 1 yard. And maybe <strong>for</strong> <strong>the</strong> in-between distances I could use<br />
a linear expression of <strong>the</strong> <strong>for</strong>m (1 - distance/10), or if I preferred, a more complicated<br />
expression of like (1 - distance2/100)<br />
Once we got <strong>the</strong> truth values <strong>for</strong> <strong>the</strong> various conditions we could use <strong>the</strong>m in one of<br />
two ways, as coefficients in a weighted sum or as probabilities in a r<strong>and</strong>om die.<br />
p. 74