models_from_log: model from log

View source: R/meta_from_log.R

models_from_logR Documentation

model from log

Description

Read model details from log file

Usage

models_from_log(meta, reward_fn = function(x, h) pmin(x, h))

Arguments

meta

a data frame containing the log metadata for each set of alpha vectors desired, see meta_from_log

reward_fn

a function f(x,a) giving the reward for taking action a given a system in state x.

Details

assumes transition can be determined by the f_from_log function, which is specific to the fisheries example

Value

a list with an element for each row in the requested meta data frame, which itself is a list of the three matrices: transition, observation, and reward, defining the pomdp problem.

Examples

 # takes > 5s

source(system.file("examples/fisheries-ex.R", package = "sarsop"))
log = tempfile()
alpha <- sarsop(transition, observation, reward, discount, precision = 10,
                log_dir = log)



sarsop documentation built on Jan. 10, 2023, 5:16 p.m.