C# Class Monopoly.RLHandlers.RLAgent

Inheritance: Monopoly.Classes.Player
Mostra file Open project: pmpailis/RLMonopoly

Public Properties

Property Type Description
currentEpoch int
traces List

Public Methods

Method Description
RLAgent ( ) : System
agent_changeCurrentState ( Observation obs ) : void
agent_cleanup ( ) : void
agent_end ( double reward ) : void
agent_init ( char type, bool policy, string agentName, int inputCount ) : void
agent_start ( Observation observation ) : int
agent_step ( Observation observation, double reward ) : int
createInput ( Observation observation, int action ) : double[]
getNeural ( ) : NeuronDotNet.Core.Network
getRentPayment ( int cp ) : int
getType ( ) : char
initParams ( ) : void
saveOnFile ( string path ) : void
setNeural ( NeuronDotNet.Core.Network net ) : void

Private Methods

Method Description
Qlearning ( Observation p_lastState, Monopoly p_lastAction, Observation newState, Monopoly bestAction, double reward ) : double
Sarsa ( Observation lastState, Monopoly lastAction, Observation newState, Monopoly newAction, double reward ) : double
calculateQValues ( Observation obs ) : double[]
checkStateSimilarity ( Observation obs1, Observation obs2 ) : bool
e_greedySelection ( double QValues ) : int
findMaxValues ( double tempQ ) : int
randomAction ( ) : int
trainNeural ( double input, double output ) : void
updateQTraces ( Observation obs, Monopoly a, double reward ) : bool
updateSTraces ( Observation obs, Monopoly a ) : bool

Method Details

RLAgent() public method

public RLAgent ( ) : System
return System

agent_changeCurrentState() public method

public agent_changeCurrentState ( Observation obs ) : void
obs Monopoly.RLClasses.Observation
return void

agent_cleanup() public method

public agent_cleanup ( ) : void
return void

agent_end() public method

public agent_end ( double reward ) : void
reward double
return void

agent_init() public method

public agent_init ( char type, bool policy, string agentName, int inputCount ) : void
type char
policy bool
agentName string
inputCount int
return void

agent_start() public method

public agent_start ( Observation observation ) : int
observation Monopoly.RLClasses.Observation
return int

agent_step() public method

public agent_step ( Observation observation, double reward ) : int
observation Monopoly.RLClasses.Observation
reward double
return int

createInput() public method

public createInput ( Observation observation, int action ) : double[]
observation Monopoly.RLClasses.Observation
action int
return double[]

getNeural() public method

public getNeural ( ) : NeuronDotNet.Core.Network
return NeuronDotNet.Core.Network

getRentPayment() public method

public getRentPayment ( int cp ) : int
cp int
return int

getType() public method

public getType ( ) : char
return char

initParams() public method

public initParams ( ) : void
return void

saveOnFile() public method

public saveOnFile ( string path ) : void
path string
return void

setNeural() public method

public setNeural ( NeuronDotNet.Core.Network net ) : void
net NeuronDotNet.Core.Network
return void

Property Details

currentEpoch public_oe property

public int currentEpoch
return int

traces public_oe property

public List traces
return List