Step the environment by one action

@param action action to step the environment with
@return the StepReply containing the next observation, the reward, if it is a terminal state and optional information.
336620
public StepReply<O> step(A action) {
        JSONObject body = new JSONObject().put("action", getActionSpace().encode(action)).put("render", render);

        JSONObject reply = ClientUtils.post(url + ENVS_ROOT + instanceId + STEP, body).getObject();

        O observation = observationSpace.getValue(reply, "observation");
        double reward = reply.getDouble("reward");
        boolean done = reply.getBoolean("done");
        JSONObject info = reply.getJSONObject("info");

        return new StepReply<O>(observation, reward, done, info);
    }
100575
public void setAction(final Action action) {
		MenuItemModel model = getOrCreateComponentModel();
		model.action = action;
		model.url = null;
	}
285386
public void setAction(String action)
    {
        ExtendedInfo info = getInfo(action);
        if (info != null)
            info._action = action;
    }
1306666
private function handleEditAllAction(EnvironmentInterface $environment, Action $action)
    {
        $this->clearClipboard($environment);
        $this->handleGlobalCommands($environment);
        $this->handleSessionOverrideEditAll(
            $this->getModelIds($environment, $action, $this->getSubmitAction($environment)),
            'properties',
            $environment
        );

        return  $this->callAction($environment, 'editAll', ['mode' => 'edit']);
    }
1139356
public function _canExecute($action)
    {
        $viewer = get_viewer();

        if ($viewer->hasSubscription()) {
            $ret = $this->getItem()->authorize('upgradepackage');
        } else {
            $ret = $this->getItem()->authorize('subscribepackage');
        }

        return $ret;
    }
896794
public void setActionSequence (String action)
    {
        // sanity check
        if (action == null) {
            log.warning("Refusing to set null action sequence " + this + ".", new Exception());
            return;
        }

        // no need to noop
        if (action.equals(_action)) {
            return;
        }
        _action = action;
        updateActionFrames();
    }
722069
private function process(Action $action, EnvironmentInterface $environment)
    {
        $inputProvider = $environment->getInputProvider();

        return $this->callAction(
            $environment,
            'showAll',
            \array_merge(
                $action->getArguments(),
                [
                    'mode' => $inputProvider->getParameter('mode'),
                    'select' => $inputProvider->getParameter('select')
                ]
            )
        );
    }
428913
function(action) {
            // if the action is a direction
            if(RL.Util.DIRECTIONS_4.indexOf(action) !== -1){
                var offsetCoord = RL.Util.getOffsetCoordsFromDirection(action),
                    moveToX = this.x + offsetCoord.x,
                    moveToY = this.y + offsetCoord.y;
                return this.move(moveToX, moveToY);
            }

            if(action === 'wait'){
                this.wait();
                return true;
            }

            return false;
        }
1220052
public Dialog negativeAction(CharSequence action){
        mNegativeAction.setText(action);
        mNegativeAction.setVisibility(TextUtils.isEmpty(action) ? View.GONE : View.VISIBLE);
        return this;
    }
393028
public static TaskTrackerAction createAction(ActionType actionType) {
    TaskTrackerAction action = null;
    
    switch (actionType) {
    case LAUNCH_TASK:
      {
        action = new LaunchTaskAction();
      }
      break;
    case KILL_TASK:
      {
        action = new KillTaskAction();
      }
      break;
    case KILL_JOB:
      {
        action = new KillJobAction();
      }
      break;
    case REINIT_TRACKER:
      {
        action = new ReinitTrackerAction();
      }
      break;
    case COMMIT_TASK:
      {
        action = new CommitTaskAction();
      }
      break;
    }

    return action;
  }
881192
public static Action composite(final Applicable... actions) {
        return new Action(input -> {
            for (Applicable action : actions) {
                action.apply(input);
            }

            return input;
        });
    }
480429
def step(self, action):
        
        obs, rews, news, infos = self.env.step(action)

        self.ret = self.ret * self.gamma + rews

        obs = self._filter_observation(obs)

        if self.ret_rms:
            self.ret_rms.update(np.array([self.ret]))
            rews = np.clip(rews / np.sqrt(self.ret_rms.var + self.epsilon), -self.cliprew, self.cliprew)

        return obs, rews, news, infos
579374
public I_CmsListDirectAction getDirectAction(String actionId) {

        Iterator<I_CmsListDirectAction> it = m_directActions.iterator();
        while (it.hasNext()) {
            I_CmsListDirectAction action = it.next();
            if (action.getId().equals(actionId)) {
                return action;
            }
        }
        return null;
    }
942186
public void runAction(ActionType action) {

        m_mode = action;
        setActionFlags();
        setCommonParameters();
        m_checkinBean.clearModules();
        for (String moduleName : getSelectedModules()) {
            m_checkinBean.addModuleToExport(moduleName);
        }
        int result = m_checkinBean.checkIn();
        String log = m_checkinBean.getLogText();
        String message = null;
        boolean error = false;
        switch (action) {
            case checkIn:
                String messageToSave = m_checkinBean.getCommitMessage();
                String emailToSave = m_checkinBean.getGitUserEmail();
                String userToSave = m_checkinBean.getGitUserName();
                CmsObject cms = m_checkinBean.getCmsObject();
                CmsUser user = cms.getRequestContext().getCurrentUser();
                setUserInfo(user, ADDINFO_USER, userToSave);
                setUserInfo(user, ADDINFO_EMAIL, emailToSave);
                setUserInfo(user, ADDINFO_MESSAGE, messageToSave);
                try {
                    cms.writeUser(user);
                } catch (CmsException e) {
                    LOG.error(e.getLocalizedMessage(), e);
                }

                List<Button> resetButtons = new ArrayList<Button>();

                Button resetHead = new Button(CmsVaadinUtils.getMessageText(Messages.GUI_GIT_BUTTON_RESET_HEAD_0));
                resetHead.setDescription(CmsVaadinUtils.getMessageText(Messages.GUI_GIT_BUTTON_RESET_HEAD_DESC_0));
                resetHead.addClickListener(new ClickListener() {

                    private static final long serialVersionUID = 1L;

                    public void buttonClick(ClickEvent event) {

                        runAction(ActionType.resetHead);
                    }
                });

                Button resetRemoteHead = new Button(
                    CmsVaadinUtils.getMessageText(Messages.GUI_GIT_BUTTON_RESET_REMOTE_HEAD_0));
                resetRemoteHead.setDescription(
                    CmsVaadinUtils.getMessageText(Messages.GUI_GIT_BUTTON_RESET_REMOTE_HEAD_DESC_0));
                resetRemoteHead.addClickListener(new ClickListener() {

                    private static final long serialVersionUID = 1L;

                    public void buttonClick(ClickEvent event) {

                        runAction(ActionType.resetRemoteHead);
                    }
                });

                if (result == 0) {
                    message = CmsVaadinUtils.getMessageText(Messages.GUI_GIT_CHECKIN_SUCCESSFUL_0);
                } else if (result == 10) {
                    message = CmsVaadinUtils.getMessageText(Messages.GUI_GIT_CHECKIN_FAILED_0);
                    error = true;
                    resetButtons.add(resetRemoteHead);
                    resetButtons.add(resetHead);
                } else {
                    message = CmsVaadinUtils.getMessageText(Messages.GUI_GIT_CHECKIN_FAILED_0);
                    error = true;
                    resetButtons.add(resetRemoteHead);
                }
                CmsGitActionResultPanel panel = new CmsGitActionResultPanel(message, log, error, resetButtons);
                addAsWindow(panel);
                break;
            case checkOut:
                if (result == 0) {
                    message = CmsVaadinUtils.getMessageText(Messages.GUI_GIT_IMPORT_SUCCESSFUL_0);
                } else {
                    message = CmsVaadinUtils.getMessageText(Messages.GUI_GIT_IMPORT_FAILED_0);
                }
                CmsGitActionResultPanel checkoutResult = new CmsGitActionResultPanel(
                    message,
                    log,
                    error,
                    new ArrayList<Button>());
                addAsWindow(checkoutResult);
                break;
            case resetHead:
                if (result == 0) {
                    message = CmsVaadinUtils.getMessageText(Messages.GUI_GIT_RESET_SUCCESSFUL_0);
                } else {
                    error = true;
                    message = CmsVaadinUtils.getMessageText(Messages.GUI_GIT_RESET_FAILED_0);
                }
                CmsGitActionResultPanel resetResult = new CmsGitActionResultPanel(
                    message,
                    log,
                    error,
                    new ArrayList<Button>());
                addAsWindow(resetResult);
                break;
            case resetRemoteHead:
                if (result == 0) {
                    message = CmsVaadinUtils.getMessageText(Messages.GUI_GIT_RESET_SUCCESSFUL_0);
                } else {
                    error = true;
                    message = CmsVaadinUtils.getMessageText(Messages.GUI_GIT_RESET_FAILED_0);
                }
                CmsGitActionResultPanel resetRemoteResult = new CmsGitActionResultPanel(
                    message,
                    log,
                    error,
                    new ArrayList<Button>());
                addAsWindow(resetRemoteResult);
                break;
            default:
                // Should never happen
        }
    }
475655
public CmdLineAction onOption(BiConsumer<@NonNull String, @NonNull String> action) {
		OptionCmdLineAction optionAction = new OptionCmdLineAction(action);

		this.optionActions.add(optionAction);
		return optionAction;
	}
639155
public void forEachIndexed(int from, int step,
                               @NotNull IndexedLongConsumer action) {
        int index = from;
        while (iterator.hasNext()) {
            action.accept(index, iterator.nextLong());
            index += step;
        }
    }
822387
public Interval newInterval (final Runnable action)
    {
        return new Interval(this) {
            @Override public void expired () {
                action.run();
            }

            @Override public String toString () {
                return "DObjectManagerInterval(" + action + ")";
            }

            @Override protected void noteRejected () {
                // don't complain
            }
        };
    }