Git Product home page Git Product logo

geisterlibrary's Introduction

geister-cpp-lib

ガイスターAI開発用の関連ファイル群です

使用方法

プレイヤの開発手順

簡易版

  1. Player/内でrandomPlayer.hppをコピーし,ファイル名を適当に変更.
  2. ファイル内のクラス名も適当に変更.
  3. 以下の2つの関数の処理を実装
    • std::string decideRed();
    • std::string decideHand(std::string res);
  4. ビルド

詳細はこちら

ビルド

makefileを用意してあるので,こちらを使用してください.
基本コマンド

make -j

ビルド時に次の変数が指定可能です.(括弧内はエイリアス)

  • PLAYER_NAME(PN): プレイヤのファイル名指定
  • PLAYER_CLASS(PC): Player.cppで参照するクラス名

make -j PN=random PC=RandomPlayer

生成ファイルについて

ビルドが完了すると,binディレクトリが作成され,
変数の指定がなければ以下のファイルが生成されます.
(環境によって生成ファイルの拡張子が異なるため,適宜読み替えてください.)

ファイル名 ファイルタイプ 説明
competition.exe 実行ファイル 対戦実行用プログラム
client.exe 実行ファイル サーバ接続用プログラム
randomPlayer.dll 共有ライブラリ ランダムプレイヤ
chototsuPlayer.dll 共有ライブラリ 猪突戦法プレイヤ
Player.dll 共有ライブラリ デフォルトプレイヤ(中身はrandomPlayerと同一)
Player.exe 実行ファイル デフォルトプレイヤの実行ファイル版

各ツールについて

詳細はこちら

  • competition
    自動対戦用ツールです.

    competition {プレイヤ1パス} {プレイヤ2パス}
    

    と実行することで,プレイヤ1とプレイヤ2の対戦が実行されます.

  • client
    https://github.com/miyo/geister_server.java
    こちらのサーバに接続するためのツールです.

    client -p {ポート番号} {プレイヤパス}
    

    のように使用します.

ファイル構成について

詳細はこちら

動作確認済み環境

  • MinGW64 & clang++(8.0.0)
  • MinGW64 & g++(9.1.0)
  • WSL & clang++(7.1.0)
  • WSL & g++(7.4.0)
  • MSVC & clang++(8.0.0)
  • CentOS & g++(8.2.0)

Macについては検証環境がないため未確認となります

使用ライブラリ

このプログラムでは,以下のライブラリを使用しています.

ライブラリ名 用途 リンク
clxライブラリ TCP通信 http://clx.cielquis.net/
nonsugarライブラリ コマンドラインパーサ https://github.com/iorate/nonsugar
asio TCP通信 https://think-async.com/Asio/

geisterlibrary's People

Contributors

kanaizumi-noritaka avatar srpkdyy avatar

Watchers

 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.