Wrote the expectiminimax algo