// Execute determines the next action to take given the current frame

Execute determines the next action to take given the current frame
// Execute determines the next action to take given the current frame
func (strat *AlphaStrategy) Execute(frame *tdef.Frame, player int) string {
	strat.count++
	a := strat.getAction(frame)
	action := strat.intToAction(a)
	if strat.lastState != nil {
		reward := strat.reward(strat.lastState, strat.lastAction, frame)
		strat.update(strat.lastState, strat.lastAction, frame, reward)
	}
	strat.lastState = frame
	strat.lastAction = a
	return action
}
func ( strat * AlphaStrategy ) Execute ( frame * tdef . Frame , player int ) string { strat . count ++ a := strat . getAction ( frame ) action := strat . intToAction ( a ) if strat . lastState != nil { reward := strat . reward ( strat . lastState , strat . lastAction , frame ) strat . update ( strat . lastState , strat . lastAction , frame , reward ) } strat . lastState = frame strat . lastAction = a return action }
Execute determines the next action to take given the current frame
Execute determines the next action to take given the current frame