Skip to content

Instantly share code, notes, and snippets.

diff --git a/source/Makefile b/source/Makefile
index 82f12fc..60ff9bf 100644
--- a/source/Makefile
+++ b/source/Makefile
@@ -97,6 +97,7 @@ SOURCES = shogi.cpp \
usi.cpp \
thread.cpp \
tt.cpp \
+ progress.cpp \
extra/book/apery_book.cpp \
diff -Nurb -i --strip-trailing-cr -Nur a/shogi-server/bin/run.sample b/shogi-server/bin/run.sample
--- a/shogi-server/bin/run.sample 1970-01-01 09:00:00.000000000 +0900
+++ b/shogi-server/bin/run.sample 2017-07-06 11:34:36.893489555 +0900
@@ -0,0 +1,45 @@
+#!/bin/bash
+# nohup sh ./run test01 0 3 test01 > /dev/null 2>&1 &
+
+if [ $# -ne 4 ]; then
+ echo 'param error'
+ echo '{this script} game-tag lifetime countdown username'

これは aws のインスタンスを使用して対戦させた時のメモです。
開発者のかたがたは、自身のプログラムを確認する為のフレームワークを持っているようなのですが、その環境を用意するとかはツライので、Ubuntu 16.04 LTS に shogi-server を入れて勝ち負けを出すとこまでのメモです。

エンジンや評価関数ファイル等は用意してあり動作することを前提として記述します。
#特殊なことがあれば追記しますが、Linux で build できるエンジンであれば大丈夫なはずです。

Windows の便利な GUI クライアントでどうこうするのではなく、黒い画面でネットワーク越しに対戦させる方の話です。
とりあえず aws 上で試す場合、 r3.large が良いかんじです。(USIエンジンを二つ動かすにはメモリが必要なので。。)

diff --git a/source/extra/test_cmd.cpp b/source/extra/test_cmd.cpp
index 452493c..d3991aa 100644
--- a/source/extra/test_cmd.cpp
+++ b/source/extra/test_cmd.cpp
@@ -1572,6 +1572,159 @@ void eval_merge(istringstream& is)
cout << "..done" << endl;
}
+void eval_merge2(istringstream& is)
+{
diff --git a/source/Makefile b/source/Makefile
index 222d35e..692a469 100644
--- a/source/Makefile
+++ b/source/Makefile
@@ -155,6 +155,10 @@ tournament:
$(MAKE) CFLAGS='$(CFLAGS) -DNDEBUG -DUSE_MAKEFILE -D$(YANEURAOU_EDITION) -DUSE_AVX2 -mbmi2 -mavx2 -DFOR_TOURNAMENT -march=corei7-avx' LDFLAGS='$(LDFLAGS) $(LTOFLAGS)' $(TARGET)
tournament-sse42:
$(MAKE) CFLAGS='$(CFLAGS) -DNDEBUG -DUSE_MAKEFILE -D$(YANEURAOU_EDITION) -DUSE_SSE42 -msse4.2 -DFOR_TOURNAMENT -march=corei7' LDFLAGS='$(LDFLAGS) $(LTOFLAGS)' $(TARGET)
+tournament-simple-neon:
+ $(MAKE) CFLAGS='$(CFLAGS) -DNDEBUG -DUSE_MAKEFILE -D$(YANEURAOU_EDITION) -DNO_SSE -mfloat-abi=hard -mfpu=neon -DFOR_TOURNAMENT -march=armv7-a -mtune=cortex-a8 -ffast-math -mabi=aapcs-linux -fforce-addr -fomit-frame-pointer' LDFLAGS='$(LDFLAGS) $(LTOFLAGS)' $(TARGET)

これはYaneuraOuをRaspberryPi3 ModelB上のRaspbianで動作させた時のメモです。
YaneuraOuのバイナリを作成してShogiGUIのエンジンとして登録するとこまで。
#Raspbianにsshで入ることができて、そこでgitやmake,clang等が使える環境であること。

YaneuraOuのビルド

YaneuraOu の取得と patch を ddc0b34 に適用

$ cd ~/ &amp;&amp; mkdir work &amp;&amp; cd work
diff --git a/autoload/twitvim.vim b/autoload/twitvim.vim
index 90b4a85..096d0eb 100644
--- a/autoload/twitvim.vim
+++ b/autoload/twitvim.vim
@@ -2479,7 +2479,7 @@ function! s:launch_browser(url)
" an existing browser window.
" Firefox appears to output to stderr as well, so the '2&>1' redirect is
" needed.
- let endcmd = has('unix') ? '> /dev/null 2&>1 &' : ''
+ let endcmd = ''
package main
import (
"bufio"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
"os"
diff --git a/hls/ngx_rtmp_hls_module.c b/hls/ngx_rtmp_hls_module.c
index d41daaa..8c1a834 100644
--- a/hls/ngx_rtmp_hls_module.c
+++ b/hls/ngx_rtmp_hls_module.c
@@ -2322,7 +2322,7 @@ ngx_rtmp_hls_cleanup_dir(ngx_str_t *ppath, ngx_msec_t playlen)
name.data[name.len - 2] == 't' &&
name.data[name.len - 1] == 's')
{
- max_age = playlen / 500;
+ max_age = playlen / 100;
// ** きたないコード **
// video(0) とか IPカメラとか mjpeg とか、opencv のvideo入力ソースから読んで、fb にマンガカメラ風の映像を垂れ流すやつ。
// ついでなので、日時とか biff とかを書いていた。
// Cortex-A8 800MHzに LCD-8000U を繋いで動作。
// g++ gomi.cc -o cam `pkg-config --cflags opencv` `pkg-config --libs opencv`
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/mman.h>
#include <linux/fb.h>