Update ai.rb

Added implementation of check_ignore

Added check_relationship