src/core/reinforcement/policy/executablepolicy/MCTSPolicy.java
public void finish(boolean update) {
        if (update) {
            if (currentState == null || stateTransitionStack.isEmpty()) return;
            currentState.update(stateTransitionStack);
        }
        stateTransitionStack = new Stack<>();
        currentState = null;
    }
/**
     * Finishes episode.
     *
     * @param update if true update is executed.
     */
Finishes episode.

@param update if true update is executed.
Finishes episode . @param update if true update is executed .
public void finish(boolean update) {
        if (update) {
            if (currentState == null || stateTransitionStack.isEmpty()) return;
            currentState.update(stateTransitionStack);
        }
        stateTransitionStack = new Stack<>();
        currentState = null;
    }
public void finish ( boolean update ) { if ( update ) { if ( currentState == null || stateTransitionStack . isEmpty ( ) ) return ; currentState . update ( stateTransitionStack ) ; } stateTransitionStack = new Stack < > ( ) ; currentState = null ; }
Finishes episode.
Finishes episode .