资源简介
一个带AI的c#版中国象棋源码,AI还算可以,能够在2-3秒内搜索6-7层,水平还可以,学习机器博弈的很不错的例子

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Collections;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
using System.Threading;
using System.IO;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
timer1.Enabled = true;
CheckForIllegalCrossThreadCalls = false;
textBox1.Enabled = false;
textBox2.Enabled = false;
deep = Int32.Parse(textBox2.Text);
shdeep = deep + 1;
try
{
StreamReader sr;
sr = File.OpenText(@“kaijuku.db“);
while (sr.Peek() != -1)
{
kaijuku.Add (sr.ReadLine());
}
sr.Close();
}
catch
{
MessageBox.Show(“开局库信息读取失败!“);
}
try
{
StreamReader sr;
sr = File.OpenText(@“shangcizoubu.db“);
while (sr.Peek() != -1)
{
shangcizoubu.Add(sr.ReadLine());
}
sr.Close();
}
catch
{
}
richTextBox1.Text = “简介:\r界面很大很难看 >_<\r\r引擎很菜很耗时 >_<\r\r总结:\r给你个机会 @_@“ ;
}
ArrayList shangcizoubu = new ArrayList();
Random r = new Random();
int ju = 4;
int ma = 3;
int xiang = 2;
int shi = 1;
int jiang = 0;
int pao = 5;
int bing = 6;
int NowPlay = 0;
int NowDown = 0; //红方在下
bool Iscall = true;
ArrayList kaijuku = new ArrayList();
ArrayList xuexi = new ArrayList();
Point NowCheck = new Point(20 20);
int[] qipan = { { 20 19 18 17 16 17 18 19 20 }
{ 0 0 0 0 0 0 0 0 0 }
{ 0 21 0 0 0 0 0 21 0 }
{ 22 0 22 0 22 0 22 0 22}
{ 0 0 0 0 0 0 0 0 0}
{ 0 0 0 0 0 0 0 0 0}
{ 14 0 14 0 14 0 14 0 14}
{ 0 13 0 0 0 0 0 13 0}
{ 0 0 0 0 0 0 0 0 0}
{ 12 11 10 9 8 9 10 11 12}};
// 子力位置价值表
public static int []PosVel = {
{ { 0 0 0 0 0 0 0 0 0}//将帅
{ 0 0 0 0 0 0 0 0 0}
{ 0 0 0 0 0 0 0 0 0}
{ 0 0 0 0 0 0 0 0
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 6719 2010-11-02 08:36 中国象棋\kaijuku.db
文件 78404 2010-12-24 20:21 中国象棋\中国象棋xx\bin\Debug\c#版中国象棋(仅供参考).rar
文件 641856 2011-01-05 17:58 中国象棋\中国象棋xx\bin\Debug\kaijuku.db
文件 4800 2010-11-12 17:52 中国象棋\中国象棋xx\bin\Debug\kaijukuxuexi.db
文件 22848 2011-01-05 17:58 中国象棋\中国象棋xx\bin\Debug\shangcizoubu.db
文件 5984 2008-06-23 11:49 中国象棋\中国象棋xx\bin\Debug\wav\check.wav
..A.SHR 8 2008-09-04 11:23 中国象棋\中国象棋xx\bin\Debug\wav\Desktop_.ini
文件 2438 2008-06-23 11:49 中国象棋\中国象棋xx\bin\Debug\wav\eat.wav
文件 23572 2006-01-17 01:36 中国象棋\中国象棋xx\bin\Debug\wav\go.wav
文件 13824 2010-01-02 02:02 中国象棋\中国象棋xx\bin\Debug\WindowsFormsApplication1.exe
文件 28160 2010-01-02 02:02 中国象棋\中国象棋xx\bin\Debug\WindowsFormsApplication1.pdb
文件 14328 2010-01-02 02:02 中国象棋\中国象棋xx\bin\Debug\WindowsFormsApplication1.vshost.exe
文件 490 2009-06-11 05:14 中国象棋\中国象棋xx\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest
文件 57344 2006-01-01 05:23 中国象棋\中国象棋xx\bin\Debug\中国象棋xx.exe
文件 87552 2006-01-01 05:23 中国象棋\中国象棋xx\bin\Debug\中国象棋xx.pdb
文件 14328 2011-01-05 16:09 中国象棋\中国象棋xx\bin\Debug\中国象棋xx.vshost.exe
文件 490 2007-07-21 01:33 中国象棋\中国象棋xx\bin\Debug\中国象棋xx.vshost.exe.manifest
文件 51200 2006-01-05 00:33 中国象棋\中国象棋xx\bin\Release\中国象棋xx.exe
文件 67072 2006-01-05 00:33 中国象棋\中国象棋xx\bin\Release\中国象棋xx.pdb
文件 6144 2010-01-06 02:16 中国象棋\中国象棋xx\bin\shangcizoubu.db
文件 84975 2006-01-01 05:12 中国象棋\中国象棋xx\Form1.cs
文件 17373 2006-01-08 00:38 中国象棋\中国象棋xx\Form1.Designer.cs
文件 6766 2006-01-08 00:38 中国象棋\中国象棋xx\Form1.resx
文件 2334 2006-01-03 01:41 中国象棋\中国象棋xx\jumian.cs
文件 0 2010-11-02 08:39 中国象棋\中国象棋xx\obj\Debug\kaijuku.db
文件 0 2010-11-02 08:39 中国象棋\中国象棋xx\obj\Debug\shangcizoubu.db
文件 1035 2010-01-02 02:02 中国象棋\中国象棋xx\obj\Debug\WindowsFormsApplication1.csproj.FileListAbsolute.txt
文件 847 2010-01-02 02:02 中国象棋\中国象棋xx\obj\Debug\WindowsFormsApplication1.csproj.GenerateResource.Cache
文件 13824 2010-01-02 02:02 中国象棋\中国象棋xx\obj\Debug\WindowsFormsApplication1.exe
文件 180 2010-01-06 02:08 中国象棋\中国象棋xx\obj\Debug\WindowsFormsApplication1.Form1.resources
............此处省略40个文件信息
- 上一篇:C# 将图片文件转换成字节流存储在TXT
- 下一篇:一个用c#文件流写的通讯录
相关资源
- 用C#绘制正弦曲线,要用到Form1_Resiz
- 异步TASK Async和await使用
- C# Mail-发送邮箱
- 采集麦克风输入并播放(基于Oraycn)
- C# 钢琴 (PianoDemo)
- lua C# .Net4.0 vs2010 LuaInterface
- C# WPF扫描仪调用Twain
- 俄罗斯方块外挂代码C#
- C# GMap.net百度地图的在线地图和离线地
- 有源码的百度地图器
- c# winform twain文件扫描并保存成图片
- 海益ERPhaiyiERP20
- Unity 3D Paint in 3D 最新版(1.56)
- C# paint.net 源代码
- C#绘制动态曲线通过控件的Paint事件,
- paintdotnet-0.1.63.zip
- WPF实现蜘蛛纸牌;
- C#版中国象棋游戏大厅版
- 开源仿photoshop c#源码paint.net
- c#单机版斗地主,基本功能已实现,有
- air_data.csv
- 航空公司客户价值分析案例数据air_
- 拍拍贷数据资源,风控算法大赛的数
- ASP.net基于百度AI的在线人脸登陆,人
- 明泰MT3系列读卡器 AIP文档及开发vbv
- mnist_train.csv
- C#使用Twain调用扫描仪
- C#中国象棋单机版.zip
- 使用Twain调用扫描仪demo
- ASP.NET 谨用 async/await
评论
共有 条评论