求以人工智能的c++原始档(请用我的骨干)

来源:百度知道 编辑:UC知道 时间:2024/06/20 09:58:26
简介
计画应该自动地选择专栏降低以一个特定的策略为基础的块。 为了要设计计算机人工智能运动员,你应该使用下列的策略:
1.摘专栏以致于在放置它取你能产生的最大的产生序列的长度 N 最大值的块之后。
2.如果领带,摘取你产生的长度 N 的序列的总数最大值的那一个。
3.如果仍然系,摘到现在为止有块的最少数字的专栏。
4.如果仍然系,摘左边-大多数的专栏

以下是骨干
const int ROW = 6; // default size of a six-row,
const int COL = 7; // seven-column vertically-suspended grids for Connect-4 game,

const int EMPTY = 0; // unoccupied if the 2-D array grid[i][j] = initial
const int PLAYER_A = 1; // occupied by the first player if grid[i][j] equals player_a
const int PLAYER_B = 2; // occupied by the second player if grid[i][j] equals player_b
const int PLAYFIRST = 3; // player's turn, the first player
const int NOTPLAYFIRST =4; // player's turn, the second player

// player_turn : can only be PLAYFIRST, or NOTPLAYFIRST
// grid : grid for the game, grid[0][0] denotes the left bottom corner of the game
// grid.grid[i]

建议上GOOGLE去搜索下!

o

最起码的 这一堆CONST 是不是该用ENUM啊?

囧,。。。

我做了一个人工智能聊天机器人软件,会学习说话,会和你聊天,想要的给我发邮件:sniperbjg@tom.com

我会的,加我,我告诉你了!