Code Monkey home page Code Monkey logo

tankbot's Introduction

Tank AI

运行方法

在非 mac 系统上若无法编译,请将 src/jsoncpp.cppsrc/jsoncpp/ 下的文件替换为其它版本。

用途 指令
生成 botzone 上的版本 make Tank_xxx_lib
本地调试 make Tank_xxx
体验 minimax 对战调参 make Anneal

上述的 xxx 包括 minimax, mcts 和 mix(以解决 mcts 在斩杀或被斩杀时的异常表现)

强烈建议设置为 Release 编译模式。

估价函数

  • 基本估价 (debug 情况下一次估值需要 5e-5 s)

    val = sum(argv[0] * tank - argv[1] * dist + argv[2] * min_ahead + argv[3] * area_fire + argv[4] * area_move) - argv[5] * first_threat

  • 斩杀判定

    考虑若干种对位关系,每一方选择:

    (1) 某坦克进攻/防守

    (2) 两坦克进攻敌方一名坦克,放空另一只坦克

​ 若一方全胜 val += argv[6] - argv[7] * 斩杀步数

  • 最后sigmoid(blue - red)

总结

  • mcts 其实两层都搜不完,和 minimax 表现差异不大。
  • 对算一步,有两个特判一定要加入代码:坦克没法动,被对方射死;坦克被两个坦克夹击,必死。

tankbot's People

Contributors

anonymous-6880 avatar feifeiobama avatar

Stargazers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.