猴子摘香蕉实验报告(含代码)(3)

2019-04-21 17:01

} else {

climbonto(i); reach(i+1); nextStep(j); /*monkeygoto(-1,i); nextStep(j); monkeygoto(0,i); nextStep(j); movebox(-1,i); nextStep(j); movebox(0,i); nextStep(j);*/

reach(i+1); nextStep(j); /*climbdown(i); nextStep(j);*/

}

else if(States[i].box==1) {

/*monkeygoto(-1,i); nextStep(j);*/ monkeygoto(1,i); nextStep(j); movebox(0,i); nextStep(j); climbonto(i);

}

}

reach(i+1); nextStep(j);

else /*box==-1*/ { }

monkeygoto(-1,i); nextStep(j); movebox(0,i); nextStep(j); climbonto(i); reach(i+1); nextStep(j);

}

/*end if*/

if(States[i].monkey==-1)

{

if(States[i].box==-1) {

if(States[i].monbox==-1) { } else {

climbdown(i);

movebox(0,i); nextStep(j); climbonto(i); reach(i+1); nextStep(j);

}

}

}

nextStep(j); movebox(0,i); nextStep(j); climbonto(i); reach(i+1); nextStep(j);

else if(States[i].box==0) { } else { }

monkeygoto(1,i); nextStep(j); movebox(0,i); nextStep(j); climbonto(i); reach(i+1); nextStep(j); monkeygoto(0,i); nextStep(j); climbonto(i); reach(i+1); nextStep(j);

/*end if*/

if(States[i].monkey==1)

{

if (States[i].box==1) { }

else if(States[i].box==-1) {

monkeygoto(-1,i); nextStep(j); movebox(0,i); nextStep(j); movebox(0,i); nextStep(j); climbonto(i);

if(States[i].monbox==-1) { } else { }

climbdown(i); nextStep(j); movebox(0,i); nextStep(j); climbonto(i); reach(i+1);

nextStep(j); movebox(0,i); nextStep(j); climbonto(i); reach(i+1); nextStep(j);

} else { }

reach(i+1); nextStep(j);

monkeygoto(0,i); nextStep(j); movebox(0,i); nextStep(j); climbonto(i); reach(i+1); nextStep(j);

}

/*end if*/

}/*end nextStep*/ int main() {

States[0].monkey=-1; States[0].box=1; States[0].banana=0; States[0].monbox=-1; nextStep(0); }

五、实验截图


猴子摘香蕉实验报告(含代码)(3).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:重庆市南开中学2017-2018学年高三9月月考英语试题 Word版含解析

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: