modified ai class
Merge https://github.com/tannner/RubyC4