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的游戏难度是每秒一次刷新, 每秒出一架飞机

 

安装方法

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

    2. pip3 install tornado

    3. pip3 install cffi
    4. pip3 install requests
  4. mkdir atc;wget 'https://raw.githubusercontent.com/chenfengyuan/atc-bot-py/master/install.sh';bash install.sh
  5. 这时候会有2个有用的目录(其他的别删, 有依赖)
    1. atc   atc游戏目录
    2. 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寻路算法~

posted @ 2014-07-04 13:54  福尔摩喵  阅读(1109)  评论(0编辑  收藏  举报