I tested the AI and it seems to be working now.  I had to fix
a few bugs, mostly typos.