battle ai method