exkazuu / aichallenge2018atcodefestival Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://www.exkazuu.net/AIChallenge2018AtCodeFestival/
License: Apache License 2.0
Home Page: https://www.exkazuu.net/AIChallenge2018AtCodeFestival/
License: Apache License 2.0
おそらくは存在するだろうこの機能が動いていません。URLの例としては https://aichallenge.exkazuu.net/contests/1/submissions/165/file のようなものです。ログインしており閲覧権限がある状態で開くと We're sorry, but something went wrong.
と表示されます。
動かなくても大きく困りはしないのですが、バグっぽいのでとりあえず報告しておきます。
11/11 22:45:05以降に行われた試合がすべて「Failed to run a game」になっており、リプレイと結果が見られなくなっています。
GitHub に不慣れですが失礼いたします。
アタックフェーズにおいて配置する数について1つ疑問があります。
ルールによれば、
「マージが発生した回数が X のとき、総和が 2^(X + 1) の正整数を置かなければならない」
となっていますが、そのあとに以下のような例が挙げられています。
「メインフェーズで 2 回マージした場合、 1 個の 8、2 個の 4、3 個の 2 のいずれかのパターンで正整数を置かなければなりません」
これはルールに従うと「'4' 個の 2」となるべきではないでしょうか。
それとも、以下を意図しているでしょうか?
「マージ回数が X のとき、正整数 2^Y (1 <= Y <= X + 1)を置くことができるが、
その場合ちょうど X - Y + 2 個置かなければならない」
Battle2048/how-to-develop.mdの通りmavenを実行しましたがエラーが発生します
環境
$ mvn exec:java
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< net.exkazuu:Battle2048 >-----------------------
[INFO] Building Battle2048 1.0.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:java (default-cli) @ Battle2048 ---
[WARNING]
java.lang.ClassNotFoundException: net.exkazuu.battle2048.Main
at java.net.URLClassLoader.findClass (URLClassLoader.java:466)
at java.lang.ClassLoader.loadClass (ClassLoader.java:566)
at java.lang.ClassLoader.loadClass (ClassLoader.java:499)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:270)
at java.lang.Thread.run (Thread.java:844)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.316 s
[INFO] Finished at: 2018-11-10T11:11:22Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project Battle2048: An exception occured while executing the Java class. net.exkazuu.battle2048.Main -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
システムから受け取ることができれば便利かと思うのですが、いかがでしょうか。
進行に必須ではないかと存じますので、もしお時間がありましたらご検討いただけると幸いです。
・現在のターン数
・残り時間
・両プレイヤーのスコア
現在五分に三試合行われていますが、こちら回数は増やすことは可能でしょう?
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: Cannot find preset's package (exkazuu-renovate-config)
レポジトリは https://github.com/exKAZUu/GameViewerForAIChallenge2018AtCodeFestival にありますが、なぜかminifiedなjsしか置いてないのでこちらにissueを立てました。よろしくお願いします。
ターンプレイヤーは上下左右のいずれかの向きを 1 個選択します。 ボード上の数たちは、選択された向きに、ボードの端か他の数にぶつかるまで移動します。 このとき 2 個の等しい数がぶつかると、それらがマージ(加算)されて 1 個の数になります。 マージが発生するたび、マージによってできた数に等しい値がスコアに加算されます。
とありますが,
2 人のプレイヤーはそれぞれ 5 x 5 のサイズのボードと 0 のスコアを持っています
の通り,ボードとスコアは各プレイヤーごとに存在します.
数の移動は,両者のボードに対して同じ向きで発生するのでしょうか?それとも,自分のボードのみに発生するのでしょうか?
This issue provides visibility into Renovate updates and their statuses. Learn more
These updates are currently rate limited. Click on a checkbox below to force their creation now.
org.junit.jupiter:junit-jupiter-engine
, org.junit.jupiter:junit-jupiter-params
, org.junit.jupiter:junit-jupiter-api
)yargs
, @types/yargs
)These updates await pending status checks. To force their creation now, click the checkbox below.
jest
, ts-jest
)These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
js-combinatorics
, @types/js-combinatorics
)例えば https://t.co/QOiiwmpwlu からアクセスすると
The page you were looking for doesn't exist.
と出てログが見られません。リロードすると見られますが、Twitterなどに気軽に対戦リプレイを貼り付けられるようにしたいため修正をお願いしたいです。
ルールでは正整数を置くになってますが
ゲームソフトウェアの実装では正整数の判定がないようにみえます
0 を配置できてしまいます
https://www.exkazuu.net/AIChallenge2018AtCodeFestival/rules/
相手のボードの任意の空マスを選び、正整数を置くことができます。
0配置再現AI
RandomAIをいじりました
import java.util.Random;
import java.util.Scanner;
public class RandomAI {
public static void main(String[] args) {
Random rnd;
if (args.length > 0) {
rnd = new Random(Long.parseLong(args[0]));
} else {
rnd = new Random();
}
Scanner scanner = new Scanner(System.in);
Board myBoard;
Board opponentBoard;
boolean hasFirstTurn = scanner.nextInt() == 0;
// random placement of tile in opponent's board
int randomRow = rnd.nextInt(Board.NB_ROWS) + 1;
int randomCol = rnd.nextInt(Board.NB_COLS) + 1;
System.out.println(randomRow + " " + randomCol);
while (true) {
int currentTurn = scanner.nextInt();
int timeLeft = scanner.nextInt();
int myScore = scanner.nextInt();
int opponentScore = scanner.nextInt();
myBoard = AIUtils.parseBoard(scanner);
opponentBoard = AIUtils.parseBoard(scanner);
boolean wrote = false;
for (Direction dir : Direction.values()) {
if (myBoard.isMovable(dir)) {
int nbMerges = myBoard.move(dir).nbMerges;
int pRow, pCol;
do {
pRow = rnd.nextInt(Board.NB_ROWS);
pCol = rnd.nextInt(Board.NB_COLS);
} while (opponentBoard.board[pRow][pCol] != 0);
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //
int count = 0, pRow2 = 0, pCol2 = 0;
for (int i = 0; i < Board.NB_ROWS; i++) {
for (int j = 0; j < Board.NB_COLS; j++) {
if (opponentBoard.board[i][j] == 0) {
count++;
if (i != pRow && j != pCol) {
pRow2 = i;
pCol2 = j;
}
}
}
}
if (nbMerges == 0 && count > 1) {
System.out.println(AIUtils.directionToCommand(dir) + " " + 2 + " " + (nbMerges) + " " + (pRow + 1) + " " + (pCol + 1) + " " + (pRow2 + 1) + " " + (pCol2 + 1));
} else {
System.out.println(AIUtils.directionToCommand(dir) + " " + 1 + " " + (nbMerges + 1) + " " + (pRow + 1) + " " + (pCol + 1));
}
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //
wrote = true;
break;
}
}
if (!wrote) {
System.out.println("die.\n");
System.out.flush();
}
}
}
}
ビジュアライザ https://www.exkazuu.net/GameViewerForAIChallenge2018AtCodeFestival/
にて、速度バーを操作してデフォルト以外の速度にした場合、MAX or それ以外で、超高速 or 低速 の2択速度でしかリプレイできていない気がする。
Windows 10 Chrome/Firefox で確認
r: ゲーム開始時に相手のボードに 2 を置く行
c: ゲーム開始時に相手のノードに 2 を置く列
ri: i 個目の数を置く行
ci: i 個目の数を置く列
ボードのサイズは 5 x 5 とありますが、これらの値の範囲はは 0 <= r,c < 5
でしょうか? それとも 1 <= r,c <= 5
でしょうか。
提出があった直後のAIは優先的に対戦を発生させ、またレートの近いAIと優先的にマッチングするようにしてほしいです。
現状ではランダムにふたつのAIを選んでマッチングをしているように見えますが、これではあまり意味がない対戦が多いです。
対戦結果ページ(https://aichallenge.exkazuu.net/contests/1#battle_results)にて、
長いAI名を使っていると「リプレイを確認」リンクがスクロールしないと見れなくなってしまうので、
AI名の長さ制限をHTML上で行うか、「リプレイを確認」リンクのレイアウトを改善してほしい。
ゲームルールにゲーム開始前の入出力の制限時間を明記する。
1 秒
ルール(仮)を本リポジトリに入れて、リポジトリ内のファイルにリンクを張りたい。
提出ファイルサイズの上限がTBDなので、こちらが1MB未満になる場合は問題ありません。
サイズ制限によって戦略が変わってくるので、首を長くしてサイズ決定をお待ちしております…!
1000ターン経過後のスコアによる勝敗決定の勝者が逆になっていませんか?
https://aichallenge.exkazuu.net/contests/1/battle_results/611
提出して10分立ちましたがwaiting状態のままです。
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: Cannot find preset's package (exkazuu)
アタックフェーズのルールには以下のようにある
すべて同じ正整数で、かつ、総和が 2X+1 の正整数を置きます。 例えば、メインフェーズで 2 回マージした場合、 1 個の 8、2 個の 4、3 個の 2 のいずれかのパターンで正整数を置かなければなりません。
一方、各ターンの出力は以下のように説明されている
vi: i 個目の数 2viを表す値
viはすべて同じ正の整数でなくていいけないので、出力は一回でよいのではないだろうか
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.