Liking cljdoc? Tell your friends :D

figurer.core


define-problemclj

(define-problem {:keys [policy value predict initial-state depth] :as options})

Defines the context for all simulation and optimization. Includes null solution because problem and solution are the same data type in figurer, differing only in degree of refinement. Internally, the problem or solution instance is referred to as a context.

policy: function from state to actuation distribution value: function from state to number predict: function from state and actuation to state initial-state: state depth: integer indicating how many timesteps to consider state: vector of doubles actuation: vector of doubles actuation distribution: vector of incanter distributions (sample from each of these distributions to get one actuation)

Defines the context for all simulation and optimization.
Includes null solution because problem and solution are
the same data type in figurer, differing only in degree
of refinement. Internally, the problem or solution
instance is referred to as a context.

  policy: function from state to actuation distribution
  value: function from state to number
  predict: function from state and actuation to state
  initial-state: state
  depth: integer indicating how many timesteps to consider
  state: vector of doubles
  actuation: vector of doubles
  actuation distribution: vector of incanter distributions
      (sample from each of these distributions to get one actuation)
sourceraw docstring

expected-valueclj

(expected-value context)
(expected-value context state)

Estimates the average value that would be found by sampling many plans from this initial state.

TODO: When state provided, need to search for nearby nodes and interpolate.

Estimates the average value that would be
found by sampling many plans from this
initial state.

TODO: When state provided, need to search for
      nearby nodes and interpolate.
sourceraw docstring

figureclj

(figure context {:keys [max-iterations max-seconds] :as options})

Perform optimization, returning a more optimized context.

Perform optimization, returning a more optimized context.
sourceraw docstring

figure-create-nodeclj

(figure-create-node context parent-node-id)

Private: Create new node following node-id. Return modified context and created node ID.

Private: Create new node following node-id.
Return modified context and created node ID.
sourceraw docstring

figure-next-nodeclj

(figure-next-node context node-id)

Private: Choose next node (or return nil to create new node).

TODO: Choose promising node (or nil if winner so far is clear) rather than just choosing randomly.

Private: Choose next node (or return nil to create new node).

TODO: Choose promising node (or nil if winner so far is clear)
      rather than just choosing randomly.
sourceraw docstring

figure-onceclj

(figure-once context)

Private: Perform one rollout to collect statistics.

Private: Perform one rollout to collect statistics.
sourceraw docstring

figure-rolloutclj

(figure-rollout context node-id remaining-depth)

Private: Reached end of nodes - follow random policy to determine end result. Return average value of remaining states.

Private: Reached end of nodes - follow random policy to determine end result.
Return average value of remaining states.
sourceraw docstring

sample-planclj

(sample-plan context)

Returns a list of states and actuations starting from a given state (defaulting to initial state). Result states is longer than actuations because initial state is included.

Returns a list of states and actuations starting
from a given state (defaulting to initial state).
Result states is longer than actuations because
initial state is included.
sourceraw docstring

sample-policyclj

(sample-policy context)
(sample-policy context state)

Samples from optimized policy for a given state (defaulting to initial state). For maximizing policies, the result should be the action that is expected to maximize the value. For random policies, the initial random distribution will be sampled. TODO: Use simulation results to refine rather than just sampling from the initial policy.

Samples from optimized policy for a given state
(defaulting to initial state). For maximizing
policies, the result should be the action that
is expected to maximize the value. For random
policies, the initial random distribution will
be sampled.
TODO: Use simulation results to refine rather
than just sampling from the initial policy.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close