public void reset() {
    if (agent == null) {
      return;
    }

    input.destroy();

    if (!agent.Commit()) {
      Gridmap2D.control.errorPopUp(Names.Errors.commitFail + player.getName());
      Gridmap2D.control.stopSimulation();
    }

    agent.InitSoar();

    input.create();

    if (!agent.Commit()) {
      Gridmap2D.control.errorPopUp(Names.Errors.commitFail + player.getName());
      Gridmap2D.control.stopSimulation();
    }
  }
  public void update(TaxiMap taxiMap) {
    input.update(
        player.getMoved(),
        player.getLocation(),
        taxiMap,
        player.getPointsDelta(),
        player.getFuel());

    if (!agent.Commit()) {
      Gridmap2D.control.errorPopUp(Names.Errors.commitFail + player.getName());
      Gridmap2D.control.stopSimulation();
    }
  }
  public SoarTaxi(Taxi taxi, Agent agent, String[] shutdown_commands) {
    this.player = taxi;
    this.agent = agent;
    this.shutdownCommands = shutdown_commands;

    agent.SetBlinkIfNoChange(false);

    input = new SoarTaxiIL(agent);
    input.create();

    if (!agent.Commit()) {
      Gridmap2D.control.errorPopUp(Names.Errors.commitFail + taxi.getName());
    }
  }