Giter Club home page Giter Club logo

aichallenge2018atcodefestival's People

Contributors

exkazuu avatar irxground avatar renovate-bot avatar renovate[bot] avatar saharan avatar stonecauldron avatar tossy310 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

saharan irxground

aichallenge2018atcodefestival's Issues

提出ファイルのダウンロード機能が壊れている

おそらくは存在するだろうこの機能が動いていません。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 個置かなければならない」

Build Failure

Battle2048/how-to-develop.mdの通りmavenを実行しましたがエラーが発生します

環境

  • Ubuntu 18.04 on Windows Subsystem Linux
  • openjdk 10.0.2 2018-07-17
  • maven 3.6.0

$ 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

AIへの入力項目について

システムから受け取ることができれば便利かと思うのですが、いかがでしょうか。
進行に必須ではないかと存じますので、もしお時間がありましたらご検討いただけると幸いです。
・現在のターン数
・残り時間
・両プレイヤーのスコア

Action Required: Fix Renovate Configuration

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)

メインフェーズでのスコア

ターンプレイヤーは上下左右のいずれかの向きを 1 個選択します。 ボード上の数たちは、選択された向きに、ボードの端か他の数にぶつかるまで移動します。 このとき 2 個の等しい数がぶつかると、それらがマージ(加算)されて 1 個の数になります。 マージが発生するたび、マージによってできた数に等しい値がスコアに加算されます。

とありますが,

2 人のプレイヤーはそれぞれ 5 x 5 のサイズのボードと 0 のスコアを持っています

の通り,ボードとスコアは各プレイヤーごとに存在します.
数の移動は,両者のボードに対して同じ向きで発生するのでしょうか?それとも,自分のボードのみに発生するのでしょうか?

Dependency Dashboard

This issue provides visibility into Renovate updates and their statuses. Learn more

Rate Limited

These updates are currently rate limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency eslint-config-prettier to v6.15.0
  • chore(deps): update dependency eslint-plugin-prettier to v3.4.1
  • chore(deps): update dependency org.apache.maven.plugins:maven-jxr-plugin to v3.1.1
  • chore(deps): update dependency style-loader to v1.3.0
  • chore(deps): update dependency vuepress to v1.8.2
  • chore(deps): update dependency webpack to v4.46.0
  • chore(deps): update junit5 monorepo to v5.8.1 (org.junit.jupiter:junit-jupiter-engine, org.junit.jupiter:junit-jupiter-params, org.junit.jupiter:junit-jupiter-api)
  • chore(deps): update dependency @types/jest to v27
  • chore(deps): update dependency @types/node to v14
  • chore(deps): update dependency @types/seedrandom to v3
  • chore(deps): update dependency com.google.guava:guava to v31
  • chore(deps): update dependency copy-webpack-plugin to v9
  • chore(deps): update dependency css-loader to v6
  • chore(deps): update dependency eslint to v8
  • chore(deps): update dependency eslint-config-prettier to v8
  • chore(deps): update dependency eslint-plugin-prettier to v4
  • chore(deps): update dependency html-webpack-plugin to v5
  • chore(deps): update dependency husky to v7
  • chore(deps): update dependency lerna to v4
  • chore(deps): update dependency lint-staged to v11
  • chore(deps): update dependency node-sass to v6
  • chore(deps): update dependency sass-loader to v12
  • chore(deps): update dependency style-loader to v3
  • chore(deps): update dependency ts-loader to v9
  • chore(deps): update dependency ts-node to v10
  • chore(deps): update dependency typescript to v4
  • chore(deps): update dependency webpack to v5
  • chore(deps): update dependency webpack-cli to v4
  • chore(deps): update dependency webpack-dev-server to v4
  • chore(deps): update dependency yarn-deduplicate to v3
  • fix(deps): update dependency js-combinatorics to v1
  • fix(deps): update dependency yargs to v17 (yargs, @types/yargs)

Pending Status Checks

These updates await pending status checks. To force their creation now, click the checkbox below.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.


  • Check this box to trigger a request for Renovate to run again on this repository

正整数ではなく0を指定できるみたいですがバグですか?

ルールでは正整数を置くになってますが
ゲームソフトウェアの実装では正整数の判定がないようにみえます
0 を配置できてしまいます

https://www.exkazuu.net/AIChallenge2018AtCodeFestival/rules/

相手のボードの任意の空マスを選び、正整数を置くことができます。


DefeatReason reason = _game.advanceMainAndAttackPhase(playerIndex, d, M, V, ps);

if ((1 << (countMerged + 1)) != (1 << exponent) * count) {


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();
            }
        }
    }
}

行と列の値域について

r: ゲーム開始時に相手のボードに 2 を置く行
c: ゲーム開始時に相手のノードに 2 を置く列
ri: i 個目の数を置く行
ci: i 個目の数を置く列

ボードのサイズは 5 x 5 とありますが、これらの値の範囲はは 0 <= r,c < 5 でしょうか? それとも 1 <= r,c <= 5 でしょうか。

対戦のマッチングを改善してほしい

提出があった直後のAIは優先的に対戦を発生させ、またレートの近いAIと優先的にマッチングするようにしてほしいです。
現状ではランダムにふたつのAIを選んでマッチングをしているように見えますが、これではあまり意味がない対戦が多いです。

Create an official site

ルール(仮)を本リポジトリに入れて、リポジトリ内のファイルにリンクを張りたい。

Action Required: Fix Renovate Configuration

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はすべて同じ正の整数でなくていいけないので、出力は一回でよいのではないだろうか

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.