greedy: Greedy Action

Description Usage Arguments Value See Also Examples

Description

Greedy() is a utility function that returns action indexes of maximal values.

Usage

1
Greedy(values)

Arguments

values

a numeric vector or matrix for values of actions. For numeric vector, it is values of all actions; for numeric matrix, each row is a set of values.

Value

an integer vector for chosen action indexes

See Also

Other value-based action functions: EpsilonGreedy(), Gibbs(), Random()

Examples

1
2
Greedy(c(2, 1, 3, 7, 5))
Greedy(matrix(c(1, 2, 2, 1), 2, 2, byrow = TRUE))

XiaoqiLu/PhD-Thesis documentation built on March 1, 2021, 10:49 a.m.