added terminal and utility functions
add minimax algorithm ai