- 基本・要素機能系
- move.api.backgammonbase.comを拡張して対戦に必要な機能をそろえる。
- mouse clickからmoveを生成する。
- pointにあるチェッカーの数を変更する(edit機能)
- cubeの位置、スコア、手番をeditする機能
- double/take/pass/beaver
- resign 1, 2, 3/accept
- roll dice XX
- move.api.backgammonbase.comを拡張して対戦に必要な機能をそろえる。
- mat file viewer
- mat fileの中身をdiv内にcopy and pasteすると棋譜鑑賞するgadgetを実行でき
- image.backgammonbase.comに飛んできたrequestにあるpositionを表示するpageを作る。
- ほかの人がどんなpositionを調べているかを見る機能。
- server側でrefererを見る。
- 対戦サーバ
- cometサーバとライブラリ
- lobbyの管理アプリ
- 対戦管理(出目の生成)
- トーナメント管理アプリ
- マッシュアップ
- mixi
- ???
- 研究ツール
- position database
- web越しのgnubg操作
2010年1月26日火曜日
idea
2010年1月23日土曜日
Dynamically Loading CSS using Javascript
I needed to load CSS via Javascript, to make blog parts.
The main idea is a making link element with Javascript. But it is not enough, since css is not always ready when control is back. So, I put some code which prefetches css using ajax. After successful loading of css, it makes a link element for css, then it calls setTimeout to make sure css is applied to DOM.
The main idea is a making link element with Javascript. But it is not enough, since css is not always ready when control is back. So, I put some code which prefetches css using ajax. After successful loading of css, it makes a link element for css, then it calls setTimeout to make sure css is applied to DOM.
function loadCSS(src, delay, onload, error){
$.ajax({
type: "GET",
url: src,
dataType: 'text',
success: function(data, dataType){
debug('inserting ' + src);
var link = $('<link rel="stylesheet" type="text/css" href="'+ src+ '" />');
$("head").append(link);
setTimeout(function(){
onload();
},
delay);
},
'error': error,
});
};
$(document).ready(function(){
loadCSS('some url of css', 1,
function(){
debug('do some thing using dynamically loaded css.');
},
function (XMLHttpRequest, testStatus, errorThrown){
debug('css load failed');
});
test
These are test cases for blog parts at Blogger.com.
4PPgAQPgc+QBIg:cAl7AAAAAAAA
Position ID: sGfwgAPbOIMDIA
Match ID: cAkxAAAAAAAA
1. Cubeful 2-ply 24/22 13/9 Eq.: -0.151
0.425 0.125 0.005 - 0.575 0.192 0.009
2-ply cubeful prune [world class]
2. Cubeful 2-ply 8/4 6/4 Eq.: -0.208 ( -0.057)
0.396 0.133 0.006 - 0.604 0.204 0.015
2-ply cubeful prune [world class]
Position ID: bbcLACC02zYEAA
Match ID: QQm2AZAASAAA
1. Rollout 13/8 5/1* Eq.: +0.8791
0.8922 0.0812 0.0043 - 0.1078 0.0096 0.0009 CL +0.9252 CF +0.8791
[0.0054 0.0055 0.0014 - 0.0054 0.0042 0.0007 CL 0.0148 CF 0.0166]
Full cubeful rollout with var.redn.
150 games, Mersenne Twister dice gen. with seed 717406193 and quasi-random dice
Play: world class 2-ply cubeful prune [world class]
keep the first 0 0-ply moves and up to 8 more moves within equity 0.16
Skip pruning for 1-ply moves.
Cube: 2-ply cubeful prune [world class]
2. Rollout 13/4 Eq.: +0.8026 ( -0.0765)
0.8893 0.0431 0.0012 - 0.1107 0.0072 0.0003 CL +0.8472 CF +0.8026
[0.0035 0.0039 0.0008 - 0.0035 0.0012 0.0003 CL 0.0110 CF 0.0130]
Full cubeful rollout with var.redn.
146 games, Mersenne Twister dice gen. with seed 717406193 and quasi-random dice
Play: world class 2-ply cubeful prune [world class]
keep the first 0 0-ply moves and up to 8 more moves within equity 0.16
Skip pruning for 1-ply moves.
Cube: 2-ply cubeful prune [world class]
4PPgAQPgc+QBIg:cAl7AAAAAAAA
Position ID: sGfwgAPbOIMDIA
Match ID: cAkxAAAAAAAA
1. Cubeful 2-ply 24/22 13/9 Eq.: -0.151
0.425 0.125 0.005 - 0.575 0.192 0.009
2-ply cubeful prune [world class]
2. Cubeful 2-ply 8/4 6/4 Eq.: -0.208 ( -0.057)
0.396 0.133 0.006 - 0.604 0.204 0.015
2-ply cubeful prune [world class]
Position ID: bbcLACC02zYEAA
Match ID: QQm2AZAASAAA
1. Rollout 13/8 5/1* Eq.: +0.8791
0.8922 0.0812 0.0043 - 0.1078 0.0096 0.0009 CL +0.9252 CF +0.8791
[0.0054 0.0055 0.0014 - 0.0054 0.0042 0.0007 CL 0.0148 CF 0.0166]
Full cubeful rollout with var.redn.
150 games, Mersenne Twister dice gen. with seed 717406193 and quasi-random dice
Play: world class 2-ply cubeful prune [world class]
keep the first 0 0-ply moves and up to 8 more moves within equity 0.16
Skip pruning for 1-ply moves.
Cube: 2-ply cubeful prune [world class]
2. Rollout 13/4 Eq.: +0.8026 ( -0.0765)
0.8893 0.0431 0.0012 - 0.1107 0.0072 0.0003 CL +0.8472 CF +0.8026
[0.0035 0.0039 0.0008 - 0.0035 0.0012 0.0003 CL 0.0110 CF 0.0130]
Full cubeful rollout with var.redn.
146 games, Mersenne Twister dice gen. with seed 717406193 and quasi-random dice
Play: world class 2-ply cubeful prune [world class]
keep the first 0 0-ply moves and up to 8 more moves within equity 0.16
Skip pruning for 1-ply moves.
Cube: 2-ply cubeful prune [world class]
2009年12月10日木曜日
time to debug server part
2009年12月9日水曜日
Handling Hover
2009年12月7日月曜日
API for make_move JSONP
This is very first edition.
- How to envoke via JSONP
use "make_move" for callback.
i.e. in jQuery,
$.ajax({
url : "http://api.backgammonbase.com/jsonp",
dataType : "jsonp",
cache : true,
jsonp : "make_move",
... snip ...
});
other parameters:
-- gnubgid
give Poisition ID + Match ID, i.e.
example: "jHPDAQXgPHgBWA:UQkyAQAAAAAA"
-- move text
give moves in text.
example: "bar/21 24/20 8/4 8/4"
use "bar" for bar, not "25" or "b"
use "off" for off. not "0" or "o"
- return values
example:
giving parameters
{
gnubgid: "jHPDAQXgPHgBWA:UQkyAQAAAAAA",
move: "bar/21 24/20 8/4 8/4"
}
U gets
{
status: true,
gnubgid: "jHPDAQXgPHgBWA:UQkyAQAAAAAA"
}
error handling is T.B.D.
2009年12月3日木曜日
Parsing gnubg output with JavaScript
登録:
投稿 (Atom)



