
com.github.chen0040.rl.actionselection.AbstractActionSelectionStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-reinforcement-learning Show documentation
Show all versions of java-reinforcement-learning Show documentation
Classical RL algorithms implemented in Java, including Q-Learn, R-Learn, SARSA, Actor-Critic
package com.github.chen0040.rl.actionselection;
import com.github.chen0040.rl.utils.IndexValue;
import com.github.chen0040.rl.models.QModel;
import com.github.chen0040.rl.models.UtilityModel;
import java.util.HashMap;
import java.util.Set;
/**
* Created by xschen on 9/27/2015 0027.
*/
public abstract class AbstractActionSelectionStrategy implements ActionSelectionStrategy {
private String prototype;
protected HashMap attributes = new HashMap();
public String getPrototype(){
return prototype;
}
public IndexValue selectAction(int stateId, QModel model, Set actionsAtState) {
return new IndexValue();
}
public IndexValue selectAction(int stateId, UtilityModel model, Set actionsAtState) {
return new IndexValue();
}
public AbstractActionSelectionStrategy(){
prototype = this.getClass().getCanonicalName();
}
public AbstractActionSelectionStrategy(HashMap attributes){
this.attributes = attributes;
}
public HashMap getAttributes(){
return attributes;
}
@Override
public abstract Object clone();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy