• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java UniversalActionType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中burlap.mdp.core.action.UniversalActionType的典型用法代码示例。如果您正苦于以下问题:Java UniversalActionType类的具体用法?Java UniversalActionType怎么用?Java UniversalActionType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



UniversalActionType类属于burlap.mdp.core.action包,在下文中一共展示了UniversalActionType类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: generateDomain

import burlap.mdp.core.action.UniversalActionType; //导入依赖的package包/类
@Override
public SADomain generateDomain() {

    SADomain domain = new SADomain();


    domain.addActionTypes(
            new UniversalActionType(ACTION_NORTH),
            new UniversalActionType(ACTION_SOUTH),
            new UniversalActionType(ACTION_EAST),
            new UniversalActionType(ACTION_WEST));

    GridWorldStateModel smodel = new GridWorldStateModel();
    RewardFunction rf = new ExampleRF();
    TerminalFunction tf = new ExampleTF();

    domain.setModel(new FactoredModel(smodel, rf, tf));

    return domain;
}
 
开发者ID:honzaMaly,项目名称:kusanagi,代码行数:21,代码来源:ExampleGridWorld.java


示例2: generateDomain

import burlap.mdp.core.action.UniversalActionType; //导入依赖的package包/类
@Override
public SADomain generateDomain() {
    SADomain domain = new SADomain();
    domain.addActionTypes(
            new UniversalActionType(NextActionEnumerations.YES.name()),
            new UniversalActionType(NextActionEnumerations.NO.name()));

    //unknown reward
    RewardFunction rf = (state, action, state1) -> defaultReward;

    //no terminal state
    TerminalFunction tf = state -> false;

    domain.setModel(new FactoredModel(model, rf, tf));

    return domain;
}
 
开发者ID:honzaMaly,项目名称:kusanagi,代码行数:18,代码来源:DecisionDomainGenerator.java


示例3: generateDomain

import burlap.mdp.core.action.UniversalActionType; //导入依赖的package包/类
@Override
public SADomain generateDomain() {

	SADomain domain = new SADomain();


	domain.addActionTypes(
			new UniversalActionType(ACTION_NORTH),
			new UniversalActionType(ACTION_SOUTH),
			new UniversalActionType(ACTION_EAST),
			new UniversalActionType(ACTION_WEST));

	GridWorldStateModel smodel = new GridWorldStateModel();
	RewardFunction rf = new ExampleRF(this.goalx, this.goaly);
	TerminalFunction tf = new ExampleTF(this.goalx, this.goaly);

	domain.setModel(new FactoredModel(smodel, rf, tf));

	return domain;
}
 
开发者ID:jmacglashan,项目名称:burlap_examples,代码行数:21,代码来源:ExampleGridWorld.java


示例4: generateDomain

import burlap.mdp.core.action.UniversalActionType; //导入依赖的package包/类
@Override
public SADomain generateDomain() {
    SADomain domain = new SADomain();

    // add in NullActions for Domain
    for (String actionName : actionNames) {
        domain.addActionType(new UniversalActionType(new ALEAction(actionName)));
    }

    return domain;
}
 
开发者ID:h2r,项目名称:burlap_ale,代码行数:12,代码来源:ALEDomainGenerator.java


示例5: generateDomain

import burlap.mdp.core.action.UniversalActionType; //导入依赖的package包/类
@Override
public Domain generateDomain() {
	
	SGDomain domain = new SGDomain();

	for(int i = 0; i < this.actionNameToIndex.length; i++){
		for(Map.Entry<String, Integer> as : this.actionNameToIndex[i].namesToInd.entrySet()){
			domain.addActionType(new UniversalActionType(i + "_" + as.getKey(), new MatrixAction(as.getKey(), as.getValue())));
		}
	}

	domain.setJointActionModel(new StaticRepeatedGameModel());
	
	return domain;
}
 
开发者ID:jmacglashan,项目名称:burlap,代码行数:16,代码来源:SingleStageNormalFormGame.java


示例6: generateAgentType

import burlap.mdp.core.action.UniversalActionType; //导入依赖的package包/类
public SGAgentType generateAgentType(int player){
	List<ActionType> actions = new ArrayList<ActionType>();
	for(Map.Entry<String, Integer> e : actionNameToIndex[player].namesToInd.entrySet()){
		actions.add(new UniversalActionType(player + e.getKey(), new MatrixAction(e.getKey(), e.getValue())));
	}
	SGAgentType type = new SGAgentType("player" + player, actions);
	return type;
}
 
开发者ID:jmacglashan,项目名称:burlap,代码行数:9,代码来源:SingleStageNormalFormGame.java


示例7: generateDomain

import burlap.mdp.core.action.UniversalActionType; //导入依赖的package包/类
@Override
public SADomain generateDomain() {
	
	SADomain domain = new SADomain();


	IPPhysicsParams cphys = this.physParams.copy();
	IPModel smodel = new IPModel(cphys);

	RewardFunction rf = this.rf;
	TerminalFunction tf = this.tf;

	if(rf == null){
		rf = new InvertedPendulumRewardFunction();
	}
	if(tf == null){
		tf = new InvertedPendulumTerminalFunction();
	}

	FactoredModel model = new FactoredModel(smodel, rf ,tf);
	domain.setModel(model);

	domain.addActionType(new UniversalActionType(ACTION_LEFT))
			.addActionType(new UniversalActionType(ACTION_RIGHT))
			.addActionType(new UniversalActionType(ACTION_NO_FORCE));

	
	return domain;
}
 
开发者ID:jmacglashan,项目名称:burlap,代码行数:30,代码来源:InvertedPendulum.java


示例8: generateDomain

import burlap.mdp.core.action.UniversalActionType; //导入依赖的package包/类
@Override
public OOSADomain generateDomain() {

	OOSADomain domain = new OOSADomain();

	domain.addStateClass(CLASS_AGENT, ExGridAgent.class)
			.addStateClass(CLASS_LOCATION, EXGridLocation.class);

	domain.addActionTypes(
			new UniversalActionType(ACTION_NORTH),
			new UniversalActionType(ACTION_SOUTH),
			new UniversalActionType(ACTION_EAST),
			new UniversalActionType(ACTION_WEST));


	OODomain.Helper.addPfsToDomain(domain, this.generatePfs());

	OOGridWorldStateModel smodel = new OOGridWorldStateModel();
	RewardFunction rf = new SingleGoalPFRF(domain.propFunction(PF_AT), 100, -1);
	TerminalFunction tf = new SinglePFTF(domain.propFunction(PF_AT));

	domain.setModel(new FactoredModel(smodel, rf, tf));


	return domain;
}
 
开发者ID:jmacglashan,项目名称:burlap_examples,代码行数:27,代码来源:ExampleOOGridWorld.java


示例9: generateDomain

import burlap.mdp.core.action.UniversalActionType; //导入依赖的package包/类
@Override
public OOSGDomain generateDomain() {
	
	OOSGDomain domain = new OOSGDomain();
	
	
	domain.addStateClass(CLASS_AGENT, GGAgent.class)
			.addStateClass(CLASS_GOAL, GGGoal.class)
			.addStateClass(CLASS_DIM_H_WALL, GGWall.GGHorizontalWall.class)
			.addStateClass(CLASS_DIM_V_WALL, GGWall.GGVerticalWall.class);
	

	domain.addActionType(new UniversalActionType(ACTION_NORTH))
			.addActionType(new UniversalActionType(ACTION_SOUTH))
			.addActionType(new UniversalActionType(ACTION_EAST))
			.addActionType(new UniversalActionType(ACTION_WEST))
			.addActionType(new UniversalActionType(ACTION_NOOP));

	
	
	OODomain.Helper.addPfsToDomain(domain, this.generatePFs());

	domain.setJointActionModel(new GridGameStandardMechanics(domain, this.semiWallProb));
	
	return domain;
}
 
开发者ID:jmacglashan,项目名称:burlap,代码行数:27,代码来源:GridGame.java


示例10: generateDomain

import burlap.mdp.core.action.UniversalActionType; //导入依赖的package包/类
@Override
public SADomain generateDomain() {
	
	SADomain domain = new SADomain();


	MCModel smodel = new MCModel(this.physParams.copy());
	if(tf == null){
		tf = new ClassicMCTF(physParams.xmax);
	}
	if(rf == null){
		rf = new GoalBasedRF(tf, 100, 0);
	}

	FactoredModel model = new FactoredModel(smodel, rf, tf);

	domain.setModel(model);

	domain.addActionType(new UniversalActionType(ACTION_FORWARD))
			.addActionType(new UniversalActionType(ACTION_BACKWARDS))
			.addActionType(new UniversalActionType(ACTION_COAST));

	
	
	return domain;
}
 
开发者ID:jmacglashan,项目名称:burlap,代码行数:27,代码来源:MountainCar.java


示例11: generateDomain

import burlap.mdp.core.action.UniversalActionType; //导入依赖的package包/类
@Override
public OOSADomain generateDomain() {
	
	OOSADomain domain = new OOSADomain();
	
	List <Double> thrustValuesTemp = this.thrustValues;
	if(thrustValuesTemp.isEmpty()){
		thrustValuesTemp.add(0.32);
		thrustValuesTemp.add(-physParams.gravity);
	}
	
	domain.addStateClass(CLASS_AGENT, LLAgent.class)
			.addStateClass(CLASS_PAD, LLBlock.LLPad.class)
			.addStateClass(CLASS_OBSTACLE, LLBlock.LLObstacle.class);

	//make copy of physics parameters
	LLPhysicsParams cphys = this.physParams.copy();
	
	//add actions
	domain.addActionType(new UniversalActionType(ACTION_TURN_LEFT))
			.addActionType(new UniversalActionType(ACTION_TURN_RIGHT))
			.addActionType(new UniversalActionType(ACTION_IDLE))
			.addActionType(new ThrustType(thrustValues));


	OODomain.Helper.addPfsToDomain(domain, this.generatePfs());

	LunarLanderModel smodel = new LunarLanderModel(cphys);
	RewardFunction rf = this.rf;
	TerminalFunction tf = this.tf;
	if(rf == null){
		rf = new LunarLanderRF(domain);
	}
	if(tf == null){
		tf = new LunarLanderTF(domain);
	}

	FactoredModel model = new FactoredModel(smodel, rf, tf);
	domain.setModel(model);
	
	return domain;
	
}
 
开发者ID:jmacglashan,项目名称:burlap,代码行数:44,代码来源:LunarLanderDomain.java


示例12: generateDomain

import burlap.mdp.core.action.UniversalActionType; //导入依赖的package包/类
/**
 * Creates a new frostbite domain.
 *
 * @return the generated domain object
 */
@Override
public OOSADomain generateDomain() {

	OOSADomain domain = new OOSADomain();

	domain.addStateClass(CLASS_AGENT, FrostbiteAgent.class)
			.addStateClass(CLASS_IGLOO, FrostbiteIgloo.class)
			.addStateClass(CLASS_PLATFORM, FrostbitePlatform.class);

	//add actions
	domain.addActionType(new UniversalActionType(ACTION_NORTH))
			.addActionType(new UniversalActionType(ACTION_SOUTH))
			.addActionType(new UniversalActionType(ACTION_EAST))
			.addActionType(new UniversalActionType(ACTION_WEST))
			.addActionType(new UniversalActionType(ACTION_IDLE));



	//add pfs
	List<PropositionalFunction> pfs = this.generatePFs();
	for(PropositionalFunction pf : pfs){
		domain.addPropFunction(pf);
	}


	FrostbiteModel smodel = new FrostbiteModel(scale);
	RewardFunction rf = this.rf;
	TerminalFunction tf = this.tf;
	if(rf == null){
		rf = new FrostbiteRF(domain);
	}
	if(tf == null){
		tf = new FrostbiteTF(domain);
	}


	FactoredModel model = new FactoredModel(smodel, rf, tf);
	domain.setModel(model);

	return domain;
}
 
开发者ID:jmacglashan,项目名称:burlap,代码行数:47,代码来源:FrostbiteDomain.java


示例13: generateDomain

import burlap.mdp.core.action.UniversalActionType; //导入依赖的package包/类
@Override
public SADomain generateDomain() {
	
	SADomain domain = new SADomain();

	CPPhysicsParams cphys = this.physParams.copy();

	RewardFunction rf = this.rf;
	TerminalFunction tf = this.tf;

	if(rf == null){
		rf = new CartPoleRewardFunction();
	}
	if(tf == null){
		tf = new CartPoleTerminalFunction();
	}

	FullStateModel smodel = cphys.useCorrectModel ? new CPClassicModel(cphys) : new CPClassicModel(cphys);

	FactoredModel model = new FactoredModel(smodel, rf, tf);
	domain.setModel(model);


	domain.addActionType(new UniversalActionType(ACTION_LEFT))
			.addActionType(new UniversalActionType(ACTION_RIGHT));


	return domain;
}
 
开发者ID:jmacglashan,项目名称:burlap,代码行数:30,代码来源:CartPoleDomain.java


示例14: generateDomain

import burlap.mdp.core.action.UniversalActionType; //导入依赖的package包/类
@Override
public Domain generateDomain() {
	
	PODomain domain = new PODomain();



	domain.addActionType(new UniversalActionType(ACTION_LEFT))
			.addActionType(new UniversalActionType(ACTION_RIGHT))
			.addActionType(new UniversalActionType(ACTION_LISTEN));

	if(this.includeDoNothing){
		domain.addActionType(new UniversalActionType(ACTION_DO_NOTHING));
	}


	ObservationFunction of = new TigerObservations(this.listenAccuracy, this.includeDoNothing);
	domain.setObservationFunction(of);

	TigerModel model = new TigerModel(correctDoorReward, wrongDoorReward, listenReward, nothingReward);
	domain.setModel(model);
	
	StateEnumerator senum = new StateEnumerator(domain, new SimpleHashableStateFactory());
	senum.getEnumeratedID(new TigerState(VAL_LEFT));
	senum.getEnumeratedID(new TigerState(VAL_RIGHT));
	
	domain.setStateEnumerator(senum);
	
	return domain;
}
 
开发者ID:jmacglashan,项目名称:burlap,代码行数:31,代码来源:TigerDomain.java



注:本文中的burlap.mdp.core.action.UniversalActionType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java CollectorSampler类代码示例发布时间:2022-05-22
下一篇:
Java SchemaObject类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap