1 / 16

リバーシ

リバーシ. 06a1056 藤田将義. スライド一覧. なぜリバーシなのか Appwizard プログラム   今の課題 まとめ. 理由. ボードゲームの基礎(入門)となる. appwizard. Appwizard はプロジェクト(アプリケーション)の基本構成を設定するツール アプリケーションの全体像にあわせて、 appwizard はそれに対応したアプリケーションの枠組み(スケルトンプログラム)を設定. プログラム. ウィンドウの編集 入力・出力処理 ルール 評価関数 探索方法. ウィンドウの編集. 探索方法. Minimax 法

Download Presentation

リバーシ

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. リバーシ 06a1056 藤田将義

  2. スライド一覧 • なぜリバーシなのか • Appwizard • プログラム   • 今の課題 • まとめ

  3. 理由 • ボードゲームの基礎(入門)となる

  4. appwizard • Appwizardはプロジェクト(アプリケーション)の基本構成を設定するツール • アプリケーションの全体像にあわせて、appwizardはそれに対応したアプリケーションの枠組み(スケルトンプログラム)を設定

  5. プログラム • ウィンドウの編集 • 入力・出力処理 • ルール • 評価関数 • 探索方法

  6. ウィンドウの編集

  7. 探索方法 • Minimax法 • αβ法(Minimax法の改良)

  8. N0-0 N0-0 N0-0 N1-0 N1-1 N1-2 N2-0 N2-1 N2-2 Minimax法 現在の状態(コンピュータの手番) -3 相手の手番 N0 N1 -8 N2 -3 -9 コンピュータ    の手番 15 -7 -3 8 3 -8 20 -9 18

  9. N1-2 20 αβ法 αの処理 現在の状態(コンピュータの手番) -3 相手の手番 βの処理 N0 N1 -8 N2 -3 -9 コンピュータ    の手番 αの処理 N0-0 N0-0 N0-0 N1-0 N1-1 N2-0 N2-1 N2-2 15 -7 -3 8 3 -8 -9 18

  10. αβ法のプログラム    ・    ・    ・ { if( temp >= alpha ) { alpha = temp; vest_x = x; //マス vest_y = y; //マス } if( alpha > beta )return( alpha ); } else    ・    ・    ・

  11. αβ法のプログラムの動作 y 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 x

  12. 実行時

  13. 今の課題 ・ ・ ・ int num; if( m_FlagForPlayer )num = CountStone( WHITE_STONE ); else num = CountStone( BLACK_STONE ); if( num > (double)( m_PutNumber + 4 ) / 2 )MessageBox( "You Win!" ); else if( num < (double)( m_PutNumber + 4 ) / 2 )MessageBox( "You Lose!" ); ・ ・ ・

  14. まとめ • Minimaxとαβ法では、確かにコンピュータの処理に差が出た • エラーをなくすのに、ものすごく時間がかかる • 今は最低限の機能しか付いていないので、出来る限り追加していく

  15. 参考文献 • リバーシのアルゴリズム    著者  Seal Software • プログラミングティーショップ http://www.geocities.co.jp/SiliconValleyBay/4543/

  16. ご清聴ありがとうございました

More Related