• 大小: 2.09MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-01-04
  • 语言: 其他
  • 标签: python  ai五子棋  

资源简介

简单的AI,可用于大学编程作业,其中的代码易懂,一般能战胜大部分人。

资源截图

代码片段和文件信息

# -*- coding: utf-8 -*-
“““
Created on Wed Aug 22 22:45:02 2018

@author: lenovo
“““
import pygame
import socket
import json
import threading
import random      
class myThread1(threading.Thread):
    def _init_(self):
        threading.Thread.__init__(self)
    def run(self):
        global _socketl_xl_yend_offensivestart
        while(start):
            opponent=_socket.recv(1024)
            threadLock=threading.Lock()
            threadLock.acquire()
            opponent=json.loads(opponent) 
            
            print(opponent)
            if “game_status“ in opponent:#------表示收到结束----               
                end={
                        ‘type‘:4
                    }
                end=json.dumps(end)
                end=end.encode(encod

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     519303  2017-09-23 10:47  五子棋AI版\client\client-cpp\json.hpp

     文件         80  2017-09-23 10:47  五子棋AI版\client\client-cpp\Makefile

     文件     286096  2017-09-23 10:47  五子棋AI版\client\client-cpp\socket

     文件       2699  2017-09-23 10:47  五子棋AI版\client\client-cpp\socket-example.cpp

     文件        589  2017-09-23 09:46  五子棋AI版\client\client-java\.idea\client-java.iml

     文件        269  2017-09-23 09:42  五子棋AI版\client\client-java\.idea\libraries\libs.xml

     文件        259  2017-09-23 09:42  五子棋AI版\client\client-java\.idea\misc.xml

     文件        274  2017-09-23 09:33  五子棋AI版\client\client-java\.idea\modules.xml

     文件        183  2017-09-23 09:33  五子棋AI版\client\client-java\.idea\vcs.xml

     文件      37278  2017-09-23 09:50  五子棋AI版\client\client-java\.idea\workspace.xml

     文件     125521  2017-09-16 15:11  五子棋AI版\client\client-java\libs\javax.json-1.1.jar

     文件      28540  2017-09-16 14:17  五子棋AI版\client\client-java\libs\javax.json-api-1.1.jar

     文件        507  2017-09-16 17:41  五子棋AI版\client\client-java\README.md

     文件       6612  2017-09-16 17:27  五子棋AI版\client\client-java\src\main\Agent.java

     文件       1050  2017-09-16 17:29  五子棋AI版\client\client-java\src\main\AgentStatus.java

     文件        409  2017-09-16 17:20  五子棋AI版\client\client-java\src\main\Config.java

     文件        640  2017-09-16 17:20  五子棋AI版\client\client-java\src\main\GameInfo.java

     文件       1491  2017-09-16 17:18  五子棋AI版\client\client-java\src\main\Main.java

     文件       3850  2017-09-16 17:28  五子棋AI版\client\client-java\src\main\Utils.java

     文件       4955  2018-09-03 11:47  五子棋AI版\client\client-python\agent.py

     文件        897  2018-08-31 14:02  五子棋AI版\client\client-python\config.py

     文件        897  2017-09-09 17:56  五子棋AI版\client\client-python\config.py.bak

     文件       1033  2018-09-19 20:44  五子棋AI版\client\client-python\main.py

     文件        300  2017-09-16 17:26  五子棋AI版\client\client-python\README.md

     文件       1033  2017-09-10 00:36  五子棋AI版\client\client-python\test.py

     文件       2378  2017-09-16 10:03  五子棋AI版\client\client-python\utils.py

     文件       5136  2017-09-23 11:50  五子棋AI版\client\client-python\__pycache__\agent.cpython-35.pyc

     文件       4807  2018-09-09 17:56  五子棋AI版\client\client-python\__pycache__\agent.cpython-36.pyc

     文件       1393  2017-09-09 17:57  五子棋AI版\client\client-python\__pycache__\config.cpython-35.pyc

     文件       1321  2018-08-31 14:02  五子棋AI版\client\client-python\__pycache__\config.cpython-36.pyc

............此处省略33个文件信息

评论

共有 条评论