目的:CEDEC2013 AI CHALLENGEに参加して賢いAIをつくろう
期間:CEDEC2013 が終わるまで
達成目標:決勝ラウンド進出
達成度 | 内容 |
ミニマムサクセス | 予選ラウンド参加 |
フルサクセス | 決勝ラウンド進出 |
アドバンスドサクセス | 上位入賞 |
CEDEC(http://cedec.cesa.or.jp/2013/)の一企画として開催されるAIコンペション。
陣取りゲームを題材に優秀なAIを競う。
ルールなど詳細は http://www.ai-comp.net/cedec2013/index.html 参照で。
決勝進出するとタダでCEDECチケットがもらえる!
月日 | CEDECスケジュール | 活動実績と予定 |
7/20 | プロジェクト発足/試作AIによる実行と検討 | |
7/21 | AIプログラム提出開始 | |
本体がvar1.0.4に版上げ。 | バグ取りと攻撃塔の修正が入る | |
7/27 | 2013年調布祭AI対戦プロジェクト内で第2回作戦会議。課題がいっぱい | |
8/09 | 予選用プログラム締切 | |
8/10 | 予選結果発表 | 決勝いきたい |
8/20 | 決勝用プログラム提出開始 | 予選より賢いプログラムつくりたい |
8/23 | 決勝 | CEDECいきたい |
内容は随時追加予定。
花火をイメージに円形に陣を広げる策戦
7/20->27で名前を「fool Fireflower」から「fireflower」に変更
まだまだ賢くないので、foolはつけとくべきだったかもしれない。
Player 1 (henteko) Score: 100
Player 2 (Fool Fireflower) Score: 10
Player 3 (SampleInternalManipu) Score: 36
Player 1 (henteko) Score: 101
Player 2 (Fool Fireflower) Score: 13
Player 3 (SampleInternalManipu) Score: 45
Player 1 (henteko) Score: 100
Player 2 (Fool Fireflower) Score: 4
Player 3 (SampleInternalManipu) Score: 21
Player 1 (henteko) Score: 100
Player 2 (Fool Fireflower) Score: 27
Player 3 (SampleInternalManipu) Score: 40
Player 1 (henteko) Score: 60
Player 2 (Fool Fireflower) Score: 50
Player 3 (SampleInternalManipu) Score: 19
Player 1 (henteko) Score: 100
Player 2 (Fool Fireflower) Score: 4
Player 3 (SampleInternalManipu) Score: 18
Player 1 (henteko) Score: 102
Player 2 (Fool Fireflower) Score: 8
Player 3 (SampleInternalManipu) Score: 32
Player 1 (henteko) Score: 46
Player 2 (Fool Fireflower) Score: 45
Player 3 (SampleInternalManipu) Score: 41
Player 1 (henteko) Score: 101
Player 2 (Fool Fireflower) Score: 14
Player 3 (SampleInternalManipu) Score: 26
Player 1 (henteko) Score: 101
Player 2 (Fool Fireflower) Score: 27
Player 3 (SampleInternalManipu) Score: 14
Terraformingでは、「-6<=x,y<=6」の中の座標を使うが、存在しない座標もある。[(6,6)など]
実は、x+yの絶対値が6以内の座標のみが使われている。そこで、以下のような座標判定関数を用いると、余計なコードや出力をしないで済むようになる。
// language : C++ #include <stdlib.h> bool isPoint(const int x, const int y) { if(abs(x+y) > 6 || abs(x) > 6 || abs(y) > 6) return false; return true; }
応用として、ある座標(x,y)から、別の座標(x1,y1)までの最短距離は、
abs(dx=x-x1)とabs(dy=y-y1)、abs(dx+dy)のmaxで求められる。
マス目が六角形なので、あるマスの周囲を調べるのが難しい。
周囲1マスなら何とかなるが、2マス以上を調べるのは骨が折れる。
しかし以下の法則を使うと、この調査がぐっと楽になる。
6方位に対し、ある方向にN回進んだ場所(a)と、(a)から120度回転した方向にn回進んだ場所(1<=n<=N)をそれぞれ調べると、中心からN歩で到達する範囲を調べられる
例として、2歩の場所を調べるとする。
[ul-ul]と、[ul-ul-r]の2箇所を調べる。(ulの120度回転した方向はr)
これを6方向それぞれについてやると、2歩でいける12マスを調べることができる
サンプルソースは汚いので略。