Python中国象棋源程序共包含五个程序文件一个图片素材包,
chinachess.py 为主文件;constants.py 数据常量;pieces.py 棋子类,走法;computer.py 电脑走法计算;button.py按钮定义。目前电脑走法比较傻,有兴趣的朋友可以对computer.py 进行升级。中国象棋源代码下载。

chinachess.py

import pygame
import time
import Xiangqi.constants as constants
from Xiangqi.button import Button
import Xiangqi.pieces as pieces
import Xiangqi.computer as computerclass MainGame():window = NoneStart_X = constants.Start_XStart_Y = constants.Start_YLine_Span = constants.Line_SpanMax_X = Start_X + 8 * Line_SpanMax_Y = Start_Y + 9 * Line_Spanplayer1Color = constants.player1Colorplayer2Color = constants.player2ColorPutdownflag = player1ColorpiecesSelected = Nonebutton_go = NonepiecesList = []def start_game(self):MainGame.window = pygame.display.set_mode([constants.SCREEN_WIDTH, constants.SCREEN_HEIGHT])pygame.display.set_caption("Python代码大全-中国象棋")MainGame.button_go = Button(MainGame.window, "重新开始", constants.SCREEN_WIDTH - 100, 300)  # 创建开始按钮self.piecesInit()while True:time.sleep(0.1)# 获取事件MainGame.window.fill(constants.BG_COLOR)self.drawChessboard()#MainGame.button_go.draw_button()self.piecesDisplay()self.VictoryOrDefeat()self.Computerplay()self.getEvent()pygame.display.update()pygame.display.flip()def drawChessboard(self): #画象棋盘mid_end_y = MainGame.Start_Y + 4 * MainGame.Line_Spanmin_start_y = MainGame.Start_Y + 5 * MainGame.Line_Spanfor i in range(0, 9):x = MainGame.Start_X + i * MainGame.Line_Spanif i==0 or i ==8:y = MainGame.Start_Y + i * MainGame.Line_Spanpygame.draw.line(MainGame.window, constants.BLACK, [x, MainGame.Start_Y], [x, MainGame.Max_Y], 1)else:pygame.draw.line(MainGame.window, constants.BLACK, [x, MainGame.Start_Y], [x, mid_end_y], 1)pygame.draw.line(MainGame.window, constants.BLACK, [x, min_start_y], [x, MainGame.Max_Y], 1)for i in range(0, 10):x = MainGame.Start_X + i * MainGame.Line_Spany = MainGame.Start_Y + i * MainGame.Line_Spanpygame.draw.line(MainGame.window, constants.BLACK, [MainGame.Start_X, y], [MainGame.Max_X, y], 1)speed_dial_start_x =  MainGame.Start_X + 3 * MainGame.Line_Spanspeed_dial_end_x =  MainGame.Start_X + 5 * MainGame.Line_Spanspeed_dial_y1 = MainGame.Start_Y + 0 * MainGame.Line_Spanspeed_dial_y2 = MainGame.Start_Y + 2 * MainGame.Line_Spanspeed_dial_y3 = MainGame.Start_Y + 7 * MainGame.Line_Spanspeed_dial_y4 = MainGame.Start_Y + 9 * MainGame.Line_Spanpygame.draw.line(MainGame.window, constants.BLACK, [speed_dial_start_x, speed_dial_y1], [speed_dial_end_x, speed_dial_y2], 1)pygame.draw.line(MainGame.window, constants.BLACK, [speed_dial_start_x, speed_dial_y2],[speed_dial_end_x, speed_dial_y1], 1)pygame.draw.line(MainGame.window, constants.BLACK, [speed_dial_start_x, speed_dial_y3],[speed_dial_end_x, speed_dial_y4], 1)pygame.draw.line(MainGame.window, constants.BLACK, [speed_dial_start_x, speed_dial_y4],[speed_dial_end_x, speed_dial_y3], 1)def piecesInit(self):  #加载棋子MainGame.piecesList.append(pieces.Rooks(MainGame.player2Color, 0,0))MainGame.piecesList.append(pieces.Rooks(MainGame.player2Color,  8, 0))MainGame.piecesList.append(pieces.Elephants(MainGame.player2Color,  2, 0))MainGame.piecesList.append(pieces.Elephants(MainGame.player2Color,  6, 0))MainGame.piecesList.append(pieces.King(MainGame.player2Color, 4, 0))MainGame.piecesList.append(pieces.Knighs(MainGame.player2Color,  1, 0))MainGame.piecesList.append(pieces.Knighs(MainGame.player2Color,  7, 0))MainGame.piecesList.append(pieces.Cannons(MainGame.player2Color,  1, 2))MainGame.piecesList.append(pieces.Cannons(MainGame.player2Color, 7, 2))MainGame.piecesList.append(pieces.Mandarins(MainGame.player2Color,  3, 0))MainGame.piecesList.append(pieces.Mandarins(MainGame.player2Color, 5, 0))MainGame.piecesList.append(pieces.Pawns(MainGame.player2Color, 0, 3))MainGame.piecesList.append(pieces.Pawns(MainGame.player2Color, 2, 3))MainGame.piecesList.append(pieces.Pawns(MainGame.player2Color, 4, 3))MainGame.piecesList.append(pieces.Pawns(MainGame.player2Color, 6, 3))MainGame.piecesList.append(pieces.Pawns(MainGame.player2Color, 8, 3))MainGame.piecesList.append(pieces.Rooks(MainGame.player1Color,  0, 9))MainGame.piecesList.append(pieces.Rooks(MainGame.player1Color,  8, 9))MainGame.piecesList.append(pieces.Elephants(MainGame.player1Color, 2, 9))MainGame.piecesList.append(pieces.Elephants(MainGame.player1Color, 6, 9))MainGame.piecesList.append(pieces.King(MainGame.player1Color,  4, 9))MainGame.piecesList.append(pieces.Knighs(MainGame.player1Color, 1, 9))MainGame.piecesList.append(pieces.Knighs(MainGame.player1Color, 7, 9))MainGame.piecesList.append(pieces.Cannons(MainGame.player1Color,  1, 7))MainGame.piecesList.append(pieces.Cannons(MainGame.player1Color,  7, 7))MainGame.piecesList.append(pieces.Mandarins(MainGame.player1Color,  3, 9))MainGame.piecesList.append(pieces.Mandarins(MainGame.player1Color,  5, 9))MainGame.piecesList.append(pieces.Pawns(MainGame.player1Color, 0, 6))MainGame.piecesList.append(pieces.Pawns(MainGame.player1Color, 2, 6))MainGame.piecesList.append(pieces.Pawns(MainGame.player1Color, 4, 6))MainGame.piecesList.append(pieces.Pawns(MainGame.player1Color, 6, 6))MainGame.piecesList.append(pieces.Pawns(MainGame.player1Color, 8, 6))def piecesDisplay(self):for item in MainGame.piecesList:item.displaypieces(MainGame.window)#MainGame.window.blit(item.image, item.rect)def getEvent(self):# 获取所有的事件eventList = pygame.event.get()for event in eventList:if event.type == pygame.QUIT:self.endGame()elif event.type == pygame.MOUSEBUTTONDOWN:pos = pygame.mouse.get_pos()mouse_x = pos[0]mouse_y = pos[1]if (mouse_x > MainGame.Start_X - MainGame.Line_Span / 2 and mouse_x < MainGame.Max_X + MainGame.Line_Span / 2) and (mouse_y > MainGame.Start_Y - MainGame.Line_Span / 2 and mouse_y < MainGame.Max_Y + MainGame.Line_Span / 2):# print( str(mouse_x) + "" + str(mouse_y))# print(str(MainGame.Putdownflag))if MainGame.Putdownflag != MainGame.player1Color:returnclick_x = round((mouse_x - MainGame.Start_X) / MainGame.Line_Span)click_y = round((mouse_y - MainGame.Start_Y) / MainGame.Line_Span)click_mod_x = (mouse_x - MainGame.Start_X) % MainGame.Line_Spanclick_mod_y = (mouse_y - MainGame.Start_Y) % MainGame.Line_Spanif abs(click_mod_x - MainGame.Line_Span / 2) >= 5 and abs(click_mod_y - MainGame.Line_Span / 2) >= 5:# print("有效点:x="+str(click_x)+" y="+str(click_y))# 有效点击点self.PutdownPieces(MainGame.player1Color, click_x, click_y)else:print("out")if MainGame.button_go.is_click():#self.restart()print("button_go click")else:print("button_go click out")def PutdownPieces(self, t, x, y):selectfilter=list(filter(lambda cm: cm.x == x and cm.y == y and cm.player == MainGame.player1Color,MainGame.piecesList))if len(selectfilter):MainGame.piecesSelected = selectfilter[0]returnif MainGame.piecesSelected :#print("1111")arr = pieces.listPiecestoArr(MainGame.piecesList)if MainGame.piecesSelected.canmove(arr, x, y):self.PiecesMove(MainGame.piecesSelected, x, y)MainGame.Putdownflag = MainGame.player2Colorelse:fi = filter(lambda p: p.x == x and p.y == y, MainGame.piecesList)listfi = list(fi)if len(listfi) != 0:MainGame.piecesSelected = listfi[0]def PiecesMove(self,pieces,  x , y):for item in  MainGame.piecesList:if item.x ==x and item.y == y:MainGame.piecesList.remove(item)pieces.x = xpieces.y = yprint("move to " +str(x) +" "+str(y))return Truedef Computerplay(self):if MainGame.Putdownflag == MainGame.player2Color:print("轮到电脑了")computermove = computer.getPlayInfo(MainGame.piecesList)#if computer==None:#returnpiecemove = Nonefor item in MainGame.piecesList:if item.x == computermove[0] and item.y == computermove[1]:piecemove= itemself.PiecesMove(piecemove, computermove[2], computermove[3])MainGame.Putdownflag = MainGame.player1Color#判断游戏胜利def VictoryOrDefeat(self):txt =""result = [MainGame.player1Color,MainGame.player2Color]for item in MainGame.piecesList:if type(item) ==pieces.King:if item.player == MainGame.player1Color:result.remove(MainGame.player1Color)if item.player == MainGame.player2Color:result.remove(MainGame.player2Color)if len(result)==0:returnif result[0] == MainGame.player1Color :txt = "失败!"else:txt = "胜利!"MainGame.window.blit(self.getTextSuface("%s" % txt), (constants.SCREEN_WIDTH - 100, 200))MainGame.Putdownflag = constants.overColordef getTextSuface(self, text):pygame.font.init()# print(pygame.font.get_fonts())font = pygame.font.SysFont('kaiti', 18)txt = font.render(text, True, constants.TEXT_COLOR)return txtdef endGame(self):print("exit")exit()if __name__ == '__main__':MainGame().start_game()

constants.py 数据常量


import pygameSCREEN_WIDTH=900
SCREEN_HEIGHT=650
Start_X = 50
Start_Y = 50
Line_Span = 60player1Color = 1
player2Color = 2
overColor = 3BG_COLOR=pygame.Color(200, 200, 200)
Line_COLOR=pygame.Color(255, 255, 200)
TEXT_COLOR=pygame.Color(255, 0, 0)# 定义颜色
BLACK = ( 0, 0, 0)
WHITE = (255, 255, 255)
RED = (255, 0, 0)
GREEN = ( 0, 255, 0)
BLUE = ( 0, 0, 255)repeat = 0pieces_images = {'b_rook': pygame.image.load("imgs/s2/b_c.gif"),'b_elephant': pygame.image.load("imgs/s2/b_x.gif"),'b_king': pygame.image.load("imgs/s2/b_j.gif"),'b_knigh': pygame.image.load("imgs/s2/b_m.gif"),'b_mandarin': pygame.image.load("imgs/s2/b_s.gif"),'b_cannon': pygame.image.load("imgs/s2/b_p.gif"),'b_pawn': pygame.image.load("imgs/s2/b_z.gif"),'r_rook': pygame.image.load("imgs/s2/r_c.gif"),'r_elephant': pygame.image.load("imgs/s2/r_x.gif"),'r_king': pygame.image.load("imgs/s2/r_j.gif"),'r_knigh': pygame.image.load("imgs/s2/r_m.gif"),'r_mandarin': pygame.image.load("imgs/s2/r_s.gif"),'r_cannon': pygame.image.load("imgs/s2/r_p.gif"),'r_pawn': pygame.image.load("imgs/s2/r_z.gif"),
}

pieces.py 棋子类,走法


import pygame
import Xiangqi.constants as constantsclass  Pieces():def __init__(self, player,  x, y):self.imagskey = self.getImagekey()self.image = constants.pieces_images[self.imagskey]self.x = xself.y = yself.player = playerself.rect = self.image.get_rect()self.rect.left = constants.Start_X + x * constants.Line_Span - self.image.get_rect().width / 2self.rect.top = constants.Start_Y + y * constants.Line_Span - self.image.get_rect().height / 2def displaypieces(self,screen):#print(str(self.rect.left))self.rect.left = constants.Start_X + self.x * constants.Line_Span - self.image.get_rect().width / 2self.rect.top = constants.Start_Y + self.y * constants.Line_Span - self.image.get_rect().height / 2screen.blit(self.image,self.rect);#self.image = self.images#MainGame.window.blit(self.image,self.rect)def canmove(self, arr, moveto_x, moveto_y):passdef getImagekey(self):return Nonedef getScoreWeight(self,listpieces):return  Noneclass Rooks(Pieces):def __init__(self, player,  x, y):self.player = playersuper().__init__(player,  x, y)def getImagekey(self):if self.player == constants.player1Color:return "r_rook"else:return "b_rook"def canmove(self, arr, moveto_x, moveto_y):if self.x == moveto_x and self.y == moveto_y:return Falseif arr[moveto_x][moveto_y] ==self.player :return  Falseif self.x == moveto_x:step = -1 if self.y > moveto_y else 1for i in range(self.y +step, moveto_y, step):if arr[self.x][i] !=0 :return False#print(" move y")return Trueif self.y == moveto_y:step = -1 if self.x > moveto_x else 1for i in range(self.x + step, moveto_x, step):if arr[i][self.y] != 0:return Falsereturn Truedef getScoreWeight(self, listpieces):score = 11return scoreclass Knighs(Pieces):def __init__(self, player,  x, y):self.player = playersuper().__init__(player,  x, y)def getImagekey(self):if self.player == constants.player1Color:return "r_knigh"else:return "b_knigh"def canmove(self, arr, moveto_x, moveto_y):if self.x == moveto_x and self.y == moveto_y:return Falseif arr[moveto_x][moveto_y] == self.player:return False#print(str(self.x) +""+str(self.y))move_x = moveto_x-self.xmove_y = moveto_y - self.yif abs(move_x) == 1 and abs(move_y) == 2:step = 1 if move_y > 0 else -1if arr[self.x][self.y + step] == 0:return Trueif abs(move_x) == 2 and abs(move_y) == 1:step = 1 if move_x >0 else -1if arr[self.x +step][self.y] ==0 :return  Truedef getScoreWeight(self, listpieces):score = 5return scoreclass Elephants(Pieces):def __init__(self, player, x, y):self.player = playersuper().__init__(player, x, y)def getImagekey(self):if self.player == constants.player1Color:return "r_elephant"else:return "b_elephant"def canmove(self, arr, moveto_x, moveto_y):if self.x == moveto_x and self.y == moveto_y:return Falseif arr[moveto_x][moveto_y] == self.player:return Falseif self.y <=4 and moveto_y >=5 or self.y >=5 and moveto_y <=4:return  Falsemove_x = moveto_x - self.xmove_y = moveto_y - self.yif abs(move_x) == 2 and abs(move_y) == 2:step_x = 1 if move_x > 0 else -1step_y = 1 if move_y > 0 else -1if arr[self.x + step_x][self.y + step_y] == 0:return Truedef getScoreWeight(self, listpieces):score = 2return score
class Mandarins(Pieces):def __init__(self, player,  x, y):self.player = playersuper().__init__(player,  x, y)def getImagekey(self):if self.player == constants.player1Color:return "r_mandarin"else:return "b_mandarin"def canmove(self, arr, moveto_x, moveto_y):if self.x == moveto_x and self.y == moveto_y:return Falseif arr[moveto_x][moveto_y] == self.player:return Falseif moveto_x <3 or moveto_x >5:return Falseif moveto_y > 2 and moveto_y < 7:return Falsemove_x = moveto_x - self.xmove_y = moveto_y - self.yif abs(move_x) == 1 and abs(move_y) == 1:return Truedef getScoreWeight(self, listpieces):score = 2return scoreclass King(Pieces):def __init__(self, player, x, y):self.player = playersuper().__init__(player, x, y)def getImagekey(self):if self.player == constants.player1Color:return "r_king"else:return "b_king"def canmove(self, arr, moveto_x, moveto_y):if self.x == moveto_x and self.y == moveto_y:return Falseif arr[moveto_x][moveto_y] == self.player:return Falseif moveto_x < 3 or moveto_x > 5:return Falseif moveto_y > 2 and moveto_y < 7:return Falsemove_x = moveto_x - self.xmove_y = moveto_y - self.yif abs(move_x) + abs(move_y) == 1:return Truedef getScoreWeight(self, listpieces):score = 150return score
class Cannons(Pieces):def __init__(self, player,  x, y):self.player = playersuper().__init__(player, x, y)def getImagekey(self):if self.player == constants.player1Color:return "r_cannon"else:return "b_cannon"def canmove(self, arr, moveto_x, moveto_y):if self.x == moveto_x and self.y == moveto_y:return Falseif arr[moveto_x][moveto_y] == self.player:return Falseoverflag = Falseif self.x == moveto_x:step = -1 if self.y > moveto_y else 1for i in range(self.y + step, moveto_y, step):if arr[self.x][i] != 0:if overflag:return Falseelse:overflag = Trueif overflag and arr[moveto_x][moveto_y] == 0:return Falseif not overflag and arr[self.x][moveto_y] != 0:return Falsereturn Trueif self.y == moveto_y:step = -1 if self.x > moveto_x else 1for i in range(self.x + step, moveto_x, step):if arr[i][self.y] != 0:if overflag:return Falseelse:overflag = Trueif overflag and arr[moveto_x][moveto_y] == 0:return Falseif not overflag and arr[moveto_x][self.y] != 0:return Falsereturn Truedef getScoreWeight(self, listpieces):score = 6return scoreclass Pawns(Pieces):def __init__(self, player, x, y):self.player = playersuper().__init__(player,  x, y)def getImagekey(self):if self.player == constants.player1Color:return "r_pawn"else:return "b_pawn"def canmove(self, arr, moveto_x, moveto_y):if self.x == moveto_x and self.y == moveto_y:return Falseif arr[moveto_x][moveto_y] == self.player:return Falsemove_x = moveto_x - self.xmove_y = moveto_y - self.yif self.player == constants.player1Color:if self.y > 4  and move_x != 0 :return  Falseif move_y > 0:return  Falseelif self.player == constants.player2Color:if self.y <= 4  and move_x != 0 :return  Falseif move_y < 0:return Falseif abs(move_x) + abs(move_y) == 1:return Truedef getScoreWeight(self, listpieces):score = 2return scoredef listPiecestoArr(piecesList):arr = [[0 for i in range(10)] for j in range(9)]for i in range(0, 9):for j in range(0, 10):if len(list(filter(lambda cm: cm.x == i and cm.y == j and cm.player == constants.player1Color,piecesList))):arr[i][j] = constants.player1Colorelif len(list(filter(lambda cm: cm.x == i and cm.y == j and cm.player == constants.player2Color,piecesList))):arr[i][j] = constants.player2Colorreturn arr

computer.py 电脑走法计算

import Xiangqi.constants as constants
#import time
from Xiangqi.pieces import listPiecestoArrdef getPlayInfo(listpieces):pieces = movedeep(listpieces ,1 ,constants.player2Color)return [pieces[0].x,pieces[0].y, pieces[1], pieces[2]]def movedeep(listpieces, deepstep, player):arr = listPiecestoArr(listpieces)listMoveEnabel = []for i in range(0, 9):for j in range(0, 10):for item in listpieces:if item.player == player and item.canmove(arr, i, j):#标记是否有子被吃 如果被吃 在下次循环时需要补会piecesremove = Nonefor itembefore in listpieces:if itembefore.x == i and itembefore.y == j:piecesremove= itembeforebreakif piecesremove != None:listpieces.remove(piecesremove)#记录移动之前的位置move_x = item.xmove_y = item.yitem.x = iitem.y = j#print(str(move_x) + "," + str(move_y) + "," + str(item.x) + "  ,  " + str(item.y))scoreplayer1 = 0scoreplayer2 = 0for itemafter in listpieces:if itemafter.player == constants.player1Color:scoreplayer1 += itemafter.getScoreWeight(listpieces)elif  itemafter.player == constants.player2Color:scoreplayer2 += itemafter.getScoreWeight(listpieces)#print("得分:"+item.imagskey +", "+str(len(moveAfterListpieces))+","+str(i)+","+str(j)+"," +str(scoreplayer1) +"  ,  "+ str(scoreplayer2) )#print(str(deepstep))#如果得子 判断对面是否可以杀过来,如果又被杀,而且子力评分低,则不干arrkill = listPiecestoArr(listpieces)if scoreplayer2 > scoreplayer1 :for itemkill in listpieces:if itemkill.player == constants.player1Color and itemkill.canmove(arrkill, i, j):scoreplayer2=scoreplayer1if deepstep > 0 :nextplayer = constants.player1Color if player == constants.player2Color else constants.player2Colornextpiecesbest= movedeep(listpieces, deepstep -1, nextplayer)listMoveEnabel.append([item, i, j, nextpiecesbest[3], nextpiecesbest[4], nextpiecesbest[5]])else:#print(str(len(listpieces)))#print("得分:" + item.imagskey + ", " + str(len(listpieces)) + "," + str(move_x) + "," + str(move_y) + "," + str(i) + "  ,  " + str(j))if player == constants.player2Color:listMoveEnabel.append([item, i, j, scoreplayer1, scoreplayer2, scoreplayer1 - scoreplayer2])else:listMoveEnabel.append([item, i, j, scoreplayer1, scoreplayer2, scoreplayer2 - scoreplayer1])#print("得分:"+str(scoreplayer1))item.x = move_xitem.y = move_yif piecesremove != None:listpieces.append(piecesremove)list_scorepalyer1 = sorted(listMoveEnabel, key=lambda tm: tm[5], reverse=True)piecesbest = list_scorepalyer1[0]if deepstep ==1 :print(list_scorepalyer1)return piecesbest

button.py 设置按钮


import pygame
class Button():def __init__(self, screen, msg, left,top):  # msg为要在按钮中显示的文本"""初始化按钮的属性"""self.screen = screenself.screen_rect = screen.get_rect()self.width, self.height = 150, 50  # 这种赋值方式很不错self.button_color = (72, 61, 139)  # 设置按钮的rect对象颜色为深蓝self.text_color = (255, 255, 255)  # 设置文本的颜色为白色pygame.font.init()self.font = pygame.font.SysFont('kaiti', 20)  # 设置文本为默认字体,字号为40self.rect = pygame.Rect(0, 0, self.width, self.height)#self.rect.center = self.screen_rect.center  # 创建按钮的rect对象,并使其居中self.left = leftself.top = topself.deal_msg(msg)  # 渲染图像def deal_msg(self, msg):"""将msg渲染为图像,并将其在按钮上居中"""self.msg_img = self.font.render(msg, True, self.text_color, self.button_color)  # render将存储在msg的文本转换为图像self.msg_img_rect = self.msg_img.get_rect()  # 根据文本图像创建一个rectself.msg_img_rect.center = self.rect.center  # 将该rect的center属性设置为按钮的center属性def draw_button(self):#self.screen.fill(self.button_color, self.rect)  # 填充颜色self.screen.blit(self.msg_img, (self.left,self.top))  # 将该图像绘制到屏幕def is_click(self):point_x, point_y = pygame.mouse.get_pos()x = self.lefty = self.topw, h = self.msg_img.get_size()in_x = x < point_x < x + win_y = y < point_y < y + hreturn in_x and in_y

Python中国象棋源代码及素材相关推荐

  1. 中国象棋c语言源代码csdn,中国象棋源代码-C语言小程序

    中国象棋源代码-C语言小程序 (11页) 本资源提供全文预览,点击全文预览即可全文预览,如果喜欢文档就下载吧,查找使用更方便哦! 19.9 积分 .*--------------------ches ...

  2. c语言象棋小程序,中国象棋源代码-C语言小程序.docx

    中国象棋源代码-C语言小程序 *chess.c*/#include "dos.h"#include "stdio.h"/**/#define RED 7#def ...

  3. java实现中国象棋 源代码

    java实现中国象棋 在网上找了很久中国象棋实现的源代码,终于找到了,下面就是源代码. /**中国象棋Java版V3.0*源文件:Chess.java*添加功能:实现了当前棋局的保存*/import ...

  4. Unity和C#开发 - 中国象棋+源代码工程

    Unity和C#开发 - 中国象棋+高清视频指导+源代码工程 https://item.taobao.com/item.htm?ft=t&id=650971483074

  5. python中国象棋github_GitHub - bupticybee/elephantfish: elephantfish: 一个只有124行的中国象棋引擎...

    介绍 elephantfish 是受到 sunfish 启发而撰写的纯python的中国象棋引擎, 整个象棋引擎核心代码只有124行(见compressed.py),棋力方面我仅进行过其与象棋小巫师傻 ...

  6. python中国象棋github_GitHub - linbirg/icyChessZero: 中国象棋alpha zero程序

    icyChessZero 中国象棋alpha zero 这个项目受到alpha go zero的启发,旨在训练一个中等人类水平或高于中等人类水平的深度神经网络,来完成下中国象棋的任务.目前这个项目仍在 ...

  7. 象棋联机java代码_中国象棋源代码Java程序

    import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; import java.io ...

  8. python 中国象棋单机版with pygame

    鼠标点击操作:两天制作,较为粗糙,很多效果还未实现. # -*- coding: utf-8 -*- # -*- coding: utf-8 -*- """ Create ...

  9. python中国象棋github_GitHub 上最火的 Python 开源项目zz

    Google 的 TensorFlow 是最流行的开源 AI 库之一.它的高计算效率,丰富的开发资源使它被企业和个人开发者广泛采用.TensorFlow 是一个采用数据流图,用于数值计算的开源软件库. ...

  10. python中国象棋人机大战_还记得浪潮杯首届象棋人机大战吗?五位高手被电脑18回合打败了...

    [DhtmlXQ] [DhtmlXQ_init]500,350[/DhtmlXQ_init] [DhtmlXQ_title]浪潮杯人机大战,电脑vs五位高手[/DhtmlXQ_title] [Dhtm ...

最新文章

  1. 关于Canvas的一些经验
  2. 使用宝塔面板部署tp5网站
  3. 电脑cmd命令大全_查询电脑IP地址
  4. Zuul 查看所有路由路径与filter(过滤器)
  5. webpart template
  6. linux bash tutorial
  7. Java缓存Ehcache-核心类和方法介绍及代码实例
  8. 北京冬奥会闭幕 冰墩墩概念股怎么样了?
  9. NPM酷库050:xmlbuilder,创建XML文件
  10. 微信小程序云开发表单使用 name的形式提交后如何清空输入内容
  11. 高等数学微积分公式大全
  12. Unity3D动态加载FBX文件
  13. 使用Monkey做一次APP的压力测试
  14. 期权定价Python实现
  15. Spark Shuffle之Tungsten-Sort
  16. Python画熊头像
  17. NodeJS学习:环境变量
  18. 一位非米粉关于小米的深度报告
  19. 根据图片颜色显示背景色
  20. PCB中solder层和paste层的区别

热门文章

  1. 计算机网络技术ui设计,UI设计小白到大神的进阶之路—入门基础篇
  2. 【论文阅读】深度学习与多种机器学习方法在不同的药物发现数据集进行对比
  3. JVM07 - 方法区
  4. 最新抖音下载无水印视频
  5. 基于Java的办公用品管理系统的设计与实现
  6. 批量修改pdf文件名称的方法
  7. gateface php,XAMPP下载-Xampp(PHP环境套件)V8.01 官方win版-ucbug软件站
  8. 压缩因子公式c语言,天然气压缩因子计算方法与流程
  9. php爬虫亚马逊,亚马逊爬虫(亚马逊 api)
  10. 使用Arduino和HMC5883L磁力计的数字罗盘