GithubHelp home page GithubHelp logo

tictactoe's Introduction

Tictactoe


这是为SAST Daily写的一个小程序,仅仅作为AlphaBeta剪枝算法的一个小例子。选择井字棋的原因主要是其本身规则简单,更容易专注于AlphaBeta Cut的过程。
我们可以看到,维基百科上那个伪代码实际上应该在求v(max)之后应当返回这个最大的结点,在代码中具体实现可以用全局变量返回。
这个程序本身是极其简陋的,而且棋力也不怎么样(还被我规定强制先手……),但棋力不足的根源其实是我的评分系统……这个系统似乎会让电脑在还有一步胜利的情况下莫名其妙地防守。不过这个不是程序的重点,应当关注的是AlphaBeta Cut的那一段代码。

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.