C# Class numl.Reinforcement.MDPConverter

Converter class for generating Markov Decision Processes.
Exibir arquivo Open project: sethjuarez/numl Class Usage Examples

Public Methods

Method Description
GetAction ( double action, int parentStateId, int childStateId ) : AI.Action

Converts a double into an IAction.

GetState ( Vector state, Summary summary, IDiscretizer discretizer ) : MDPState

Converts the state vector into an MDP state.

GetStates ( Matrix states, Math properties, IDiscretizer discretizer ) : IEnumerable

Converts a Matrix of states into an array of State objects.

GetStates ( Matrix states, Vector actions, Matrix statesP, Vector reward, Math properties, IDiscretizer discretizer ) : IEnumerable

Returns a graph of MDP States from the States matrices and Action label vector.

GetStates ( Matrix states, Vector actions, Matrix statesP, Math properties, IDiscretizer discretizer ) : Tuple,IEnumerable,IEnumerable>

Returns a flat collection of states/actions and their transition states.

ToExamples ( this state ) : Tuple

Converts an MDP State (recursively) into it's equivalent math form, including all successor states.

ToExamples ( this states ) : Tuple

Converts an enumerable of MDP States (recursively) into their equivalent math forms, including their successor states.

ToVector ( this state ) : Vector

Converts the MDP State into a vector form.

Private Methods

Method Description
Convert ( this state, List &nodes, Matrix &states, Vector &actions, Matrix &statesP, Vector &rewards ) : void

Converts the experience pair into their equivalent math forms.

GetActionKey ( int stateId, int tStateId ) : string

Method Details

GetAction() public static method

Converts a double into an IAction.
public static GetAction ( double action, int parentStateId, int childStateId ) : AI.Action
action double Double.
parentStateId int Parent state identifier.
childStateId int Child state identifier.
return AI.Action

GetState() public static method

Converts the state vector into an MDP state.
public static GetState ( Vector state, Summary summary, IDiscretizer discretizer ) : MDPState
state numl.Math.LinearAlgebra.Vector State vector.
summary numl.Math.Summary Feature properties from the original set.
discretizer IDiscretizer Discretization function for generating unique state identifiers.
return MDPState

GetStates() public static method

Converts a Matrix of states into an array of State objects.
public static GetStates ( Matrix states, Math properties, IDiscretizer discretizer ) : IEnumerable
states Matrix State matrix.
properties System.Math (Optional) Feature summary.
discretizer IDiscretizer Disretization function to apply for reducing states.
return IEnumerable

GetStates() public static method

Returns a graph of MDP States from the States matrices and Action label vector.
public static GetStates ( Matrix states, Vector actions, Matrix statesP, Vector reward, Math properties, IDiscretizer discretizer ) : IEnumerable
states Matrix State matrix.
actions numl.Math.LinearAlgebra.Vector Action label vector.
statesP Matrix Transition states matrix.
reward numl.Math.LinearAlgebra.Vector Reward value vector.
properties System.Math Feature properties from the original set.
discretizer IDiscretizer Discretization function for generating unique state identifiers.
return IEnumerable

GetStates() public static method

Returns a flat collection of states/actions and their transition states.
public static GetStates ( Matrix states, Vector actions, Matrix statesP, Math properties, IDiscretizer discretizer ) : Tuple,IEnumerable,IEnumerable>
states Matrix State matrix.
actions numl.Math.LinearAlgebra.Vector Action label vector.
statesP Matrix Transition states matrix.
properties System.Math (Optional) Feature summary.
discretizer IDiscretizer Disretization function to apply for reducing states.
return Tuple,IEnumerable,IEnumerable>

ToExamples() public static method

Converts an MDP State (recursively) into it's equivalent math form, including all successor states.
public static ToExamples ( this state ) : Tuple
state this The starting state.
return Tuple

ToExamples() public static method

Converts an enumerable of MDP States (recursively) into their equivalent math forms, including their successor states.
public static ToExamples ( this states ) : Tuple
states this An enumerable of states.
return Tuple

ToVector() public static method

Converts the MDP State into a vector form.
public static ToVector ( this state ) : Vector
state this MDP State.
return numl.Math.LinearAlgebra.Vector