private Types.ACTIONS getOppNotLosingAction(StateObservationMulti stm, int thisID, int oppID)
    {
        int no_players = stm.getNoPlayers();
        ArrayList<Types.ACTIONS> oppActions = stm.getAvailableActions(oppID);

        ArrayList<Types.ACTIONS> nonDeathActions = new ArrayList<>();

        //Look for the opp actions that would not kill the opponent.
        for (Types.ACTIONS action : stm.getAvailableActions(oppID)) {
            Types.ACTIONS[] acts = new Types.ACTIONS[no_players];
            acts[thisID] = Types.ACTIONS.ACTION_NIL;
            acts[oppID] = action;

            StateObservationMulti stCopy = stm.copy();
            stCopy.advance(acts);

            if(stCopy.getMultiGameWinner()[oppID] != Types.WINNER.PLAYER_LOSES)
                nonDeathActions.add(action);
        }

        if(nonDeathActions.size() == 0)
            //Simply random
            return oppActions.get(new Random().nextInt(oppActions.size()));
        else
            //Random, but among those that would not kill the opponent.
            return (Types.ACTIONS) Utils.choice(nonDeathActions.toArray(), m_rnd);
    }