Improved Action Selection

From OpenCog
Jump to: navigation, search


This page describes a potential refactoring of the action selection agent, which is part of the OpenPsi motivated-action module of OpenCog.

Current Action Selection

The current action selection agent works, roughly, as follows:

  • Pick which is the "ruling" Demand to be pursued
  • If no current plan is being executed then,
    • Learn a plan (using a fairly simple planner)
    • Execute the plan

Improved / Refactored Action Selection

A more generally useful OpenPsi control flow would be

  • Step 1: Create a set of objective functions, each with their weight (each of these may be a Demand, or a weighted combination of Demands)
    • So, choosing the single ruling Demand is the simplest way to do this, but not the only way to do this
  • Step 2: Launch a reasoning/planning/whatever process (could be a specialized planner; could be the PLN backward chainer), aiming to find procedures that will optimize the objective function
    • Note, ideally this process must take into account knowledge about whatever processes are currently running, and what goals they are aiming to achieve
      • Of course a very lame reasoner could choose not to suggest any procedure unless there are no currently running procedures, which is what the current action selection agent does...
    • Note, some tweaking to the URE may be needed to support backward chaining toward a weighted combination of goals. More on that later.
  • Step 3: Execute the procedures that are chosen
    • Note, resolution of conflicts and leveraging of synergies between the set of procedures running at a certain time, aka Execution Management, still has to be done, separately from OpenPsi. This has some overlap with the thinking that needs to be done before launching a procedure concurrently with other already-running procedures, of course.

With this approach, much of the stuff currently done in the action selection agent would be done inside the reasoning/planning process, and the action selection agent would be a lot simpler.