Git Product home page Git Product logo

cross-os-guide's Introduction

cross-os-guide

本教程主要针对跨系统运行Go AI程序的问题

Gogui在Windows上

本段介绍如何在Windows的Gogui上对战来自Windows或Linux的AI

将以下文件放在Gogui所在的Windows电脑上的一个目录中

  • 本项目socat-win/下的所有文件
  • (Win下选手的ai-win.exe)

同时,Linux选手在Gogui的同一子网的另一台Linux电脑上,安装socat软件(sudo apt-get install socat),之后运行:

socat -ddd -v TCP4-LISTEN:5556,fork,reuseaddr \ 
       SYSTEM:"启动你的程序的命令"

然后运行ip addr来查看本机IP地址

之后,在Gogui的Program - New Program中,填写:

command = 
"C:\Program Files\GoGui\gogui-twogtp.exe" -black ai-win.exe -white "socat.exe STDIO tcp-connect:Linux的IP地址:5556" -verbose

working dir=
存放ai-win.exe的目录

之后即可让ai-win作为黑,ai-linux作为白对战。同理也可以两个ai-linux对战,只要把-black ai-win.exe换成-black "socat.exe ..."即可

原理图:

                                            /<---- [ Black commands ] --[ STDIO ] ---> ai-win.exe
Gogui <----[ STDIO ] ----> gogui-twogtp.exe
                                            \<---- [ White commands ] --[ STDIO ] ---> socat.exe STDIO tcp-connect <-- [ SOCKET ] -- > socat TCP4-LISTEN SYSTEM <---[ STDIO ]---> ai-linux

cross-os-guide's People

Contributors

htfy96 avatar

Watchers

Haochen Huang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.