python 华人开发的人工智能框架_EasyAI是一个纯 Python 编写的人工智能框架

easyAI

EasyAI (full documentation here) is a pure-Python artificial intelligence framework for two-players abstract games such as Tic Tac Toe, Connect 4, Reversi, etc. It makes it easy to define the mechanisms of a game, and play against the computer or solve the game. Under the hood, the AI is a Negamax algorithm with alpha-beta pruning and transposition tables as described on Wikipedia.

Installation

If you have pip installed, type this in a terminal

sudo pip install easyAI

Otherwise, dowload the source code (for instance on Github), unzip everything into one folder and in this folder, in a terminal, type

sudo python setup.py install

Additionnally you will need to install Numpy to be able to run some of the examples.

A quick example

Let us define the rules of a game and start a match against the AI:

from easyAI import TwoPlayersGame, Human_Player, AI_Player, Neg

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值