public boolean[] getAction()
    {
        // this Agent requires observation integrated in advance.

        if (mergedObservation[11][13] != 0 || mergedObservation[11][12] != 0 ||  DangerOfGap())
        {
            if (isMarioAbleToJump || ( !isMarioOnGround && action[Mario.KEY_JUMP]))
            {
                action[Mario.KEY_JUMP] = true;
            }
            ++trueJumpCounter;
        }
        else
        {
            action[Mario.KEY_JUMP] = false;
            trueJumpCounter = 0;
        }

        if (trueJumpCounter > 16)
        {
            trueJumpCounter = 0;
            action[Mario.KEY_JUMP] = false;
        }

        action[Mario.KEY_SPEED] = DangerOfGap();
        return action;
    }