Skip to content
nushio3 edited this page Jun 17, 2011 · 9 revisions

Rules

プレイヤは0,1。ターンは(p0のターン1、p1のターン1、p0のターン2、p1のターン2・・・)の順。スロットは0..255までの256個。各スロットはフィールド(0..65535までの整数、もしくは関数の値をとる)とバイタリティ(-1..65535までの整数の値をとる)を持つ。数値は0..255の範囲にある場合有効なスロット番号と解釈される。スロットのバイタリティが0か-1のときスロットは死んでいる。そうでなければ生きている。初期状態で、フィールドは恒等写像id、バイタリティは10000にセットされている。カードの値は以下の値 Rules/Cards で固定。

Each match of LTG is played by two programs (player 0 and player 1) in alternate turns (turn 1 of player 0, turn 1 of player 1, turn 2 of player 0, turn 2 of player 1, etc.). Each player owns 256 slots, numbered from 0 to 255, and a fixed set of cards. A slot consists of a field and an integer called vitality, ranging from -1 to 65535. A field holds a value, which is either an integer, ranging from 0 to 65535, or a function (in the sense of programming languages). A value is a valid slot number if it is an integer greater than or equal to 0, and less than or equal to 255. A slot is dead if its vitality is 0 or -1; otherwise the slot is alive. At the start of each match, every field is initialized to the identity function (a function that takes an argument x and returns x) and every vitality is initialized to 10000. The cards have fixed values as defined below.

各ターンで、当事者(proponent)は1つの左適用か1つの右適用をできる。左適用は1つのカードを当事者のスロットのフィールドの1つに適用する。右適用は当事者のスロットのフィールドの1つをカードに適用する。いずれの場合も、「適用する側が関数じゃない」「スロットが死んでいる」場合にはエラーが投げられる。対戦者(opponent)は当時者がどのカードとスロットにどの適用をしたか知ることが出来る。 (注:fをxへ適用するとは、f(x)のこと) (注:LTGにおける関数適用はcall by valueである。)

In each turn, the player (called the proponent) performs either a left application or a right application. A left application applies (as a function) a card to the field of one of the proponent's slots. A right application applies (as a function) the field of one of the proponent's slots to a card. In either case, an error is raised if the card or the field to be applied is not a function, or if the slot is dead. The other player (called the opponent) is able to see which application the proponent has chosen on what card and slot. [Remark: In mathematics and programming languages (as well as in our rules), one applies a function to an argument, not vice versa; that is, "applying f to x" means "f(x)", not "x(f)".] [Remark: As a result of the rules, all function applications in LTG are "call by value": that is, the argument x of function application f(x) is always a value.]

ターンは、「エラーが投げられた時」「左適用か右適用の結果発生した関数適用の累計(自身を含む)が1000を超えた時」「左右適用の結果が制限を超えること無く値を返した時」終了する。最後の場合、左右適用でスロットのフィールドが、返り値で置き換えられる。その他の場合、スロットのフィールドはidで置き換えられる。エラーが投げられたり累計リミットが超えた場合でも、関数適用の結果生じた副作用は巻き戻されない。カードは適用によって消費されるわけではなく、何回でも使うことが出来る。

The turn ends when an error is raised, when the number of function applications caused by the left or right application (including itself) exceeds 1000, or when the left or right application returns a value without exceeding this limit. In the last case, the field of the slot used for the left or right application is overwritten with the return value. In the other cases, it is overwritten with the identity function. Effects caused by function applications are not rewound and remain even if an error is raised or the application limit is exceeded. Cards are not consumed by applications and can be reused as many times as necessary.

試合は各プレイヤーが10万ターン経過したあとか、あるターンの終了時、あるプレイヤーのスロットがすべて死んでいれば終了する。 いずれの場合でも、スロットの生きている数が多いプレイヤーが勝ち。同数の場合は引き分け。

A match ends after 100000 turns of each player, or when every slot of a player has become dead after a turn. In either case, a player wins if it has more slots alive than the other player. The players tie if the numbers of slots alive are equal.

評価

2ラウンド制。第1ラウンドではプレイヤー0としてn人のランダムに選ばれたプレイヤー1と戦う。nは最低でも15でジャッジが調整するよ。100,000ターン以内にプレイヤー1に勝ったら6点。100,000ターン超えたら2点。引き分けなら1点。トータルの点数で競う。

Submitted programs are evaluated in two rounds. In the first round, each program plays as player 0 against n randomly chosen distinct programs as player 1. The number n will be at least 15 and determined by the judges considering the number of submissions and the actual time required for the matches. In each match, 6 (resp. 2) points are given to player 0 if it wins against player 1 within (resp. after) 100000 turns, and 1 point is given to player 0 in case of a tie (in this round, no point is given to player 1). The programs are ranked by the total points.

第2ラウンドではベスト30プログラムが互いに戦う。点数は第1ラウンドと同じ。

In the second round, the best 30 (or more, in case of ties) programs in the first round play against each of the other 29 (or more) programs to determine the 1st and 2nd places. In each match, 6 (resp. 2) points are given to a program if it wins against another program within (resp. after) 100000 turns, and 1 point is given to both programs in case of a tie. The programs are ranked by the total points from the second round (points from the first round are not included). [Remark: In case of ties for the 1st and/or 2nd places, the prize(s) will be divided equally. Details of this division are at the discretion of the judges.]

READMEを書いてJudges' prizeと握手!

Judges' prize will be determined discretionarily on the basis of the optional README files and the submissions themselves.

Clone this wiki locally