欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

atc游戏bot

发布时间:2024/4/17 编程问答 43 豆豆
生活随笔 收集整理的这篇文章主要介绍了 atc游戏bot 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

游戏玩起来太虐心了,就写了个bot来玩, 代码在此:

git clone https://github.com/chenfengyuan/atc-bot-new.git
git clone https://github.com/chenfengyuan/atc-bot-py.git
git clone https://github.com/chenfengyuan/atc.git

使用a star寻路算法

游戏截图

最好成绩(随便跑跑的)

airports的游戏难度是每秒一次刷新, 每秒出一架飞机

 

安装方法

  • 安装14.04版本的ubuntu(更新版本应该也行)
  • sudo aptitude install git flex bison ncurses-dev libbsd-dev qt5-default build-essential libgtest-dev python3-setuptools python3-dev libffi-dev
  • 没装过tornado同学,请用一下方式安装(要root)
  • python3 -m easy_install pip

  • pip3 install tornado

  • pip3 install cffi
  • pip3 install requests
  • mkdir atc;wget 'https://raw.githubusercontent.com/chenfengyuan/atc-bot-py/master/install.sh';bash install.sh 这时候会有2个有用的目录(其他的别删, 有依赖)
  • atc   atc游戏目录
  • atc-bot-py   bot目录
  • 启动方法

    1. 开一个终端, cd $ATC/atc/;./server.py

    2. 开一个终端, cd $ATC/atc/;./atc -f airports < action

    3. 开一个终端, cd $ATC/atc-bot-py;./atc-bot-py

     

    这时候第二个屏幕就应该出现游戏了~ happy hacking

    使用的是a star寻路算法~

    转载于:https://www.cnblogs.com/cfy42/p/3823958.html

    总结

    以上是生活随笔为你收集整理的atc游戏bot的全部内容,希望文章能够帮你解决所遇到的问题。

    如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。