Implementing AI for Kalah Game: Tournament Strategies Revealed

assignment 3 kalah n.w
1 / 8
Embed
Share

Delve into the world of AI programming with a focus on developing strategies for the Kalah game. This assignment entails writing code in Python to create an AI player that can compete in tournaments. Explore topics such as heuristic functions, algorithm design, and tournament play, all highlighted in the report. Uncover how different heuristic functions impact performance and strategy development, and gain insights into tournament dynamics. Don't miss out on the minmax algorithm with alpha-beta pruning!

  • AI Programming
  • Kalah Game
  • Tournament Strategies
  • Heuristic Functions
  • Python

Uploaded on | 1 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Assignment #3: Kalah

  2. File main.py (Basic functions for Kalah game, connecting to the server, etc.) ui.py (GUI interface for the game) ai.py (Your job: determine next move according to current situation)

  3. ai.py Class state (storing current stones in each hole and kalah) Function move (determine your next move, choose a hole from number 0 5) Function minmax (minmax algorithm with alpha-beta pruning) Note: 1. Must be minmax algorithm with alpha-beta pruning algorithm! Otherwise you will loss all points! 2. Don t change the names of important variables and functions.

  4. Turn In hw3.zip ai.py report.pdf

  5. Report report describing your implementation (at most 5 pages, 1 margins, 11pt, double-spaced), 8 points: A brief description of the game: 1 points. The definition of your heuristic function and its justification. Illustrate how it works with example moves it chose and explain why it chose them in terms of the function: 3 points. The details of your program design, experiments and results: How long it takes to make a move at different search depths and specify your CPU speed in the report. Timing restrictions are only for the tournament: 2 points. How each heuristic function you designed affect the performance, e.g., the algorithm with this heuristic function vs the algorithm without this heuristic function: 2 points.

  6. Experiments and Results Heuristic functions ????????? ???????? = ?1+ ?2+ ?3+ ?4 Function F1 +F2 +F3 +F4 Baseline 0 vs 5 0 vs 5 0 vs 5 0 vs 5 Baseline could be a na ve model you built, or previous version of the algorithm, e.g. (F1+F2+F3 vs F1+F2) Searching time at different depth Depth 1 2 3 4 Time 0s 0s 0s 0s Note: The search time is at most 1 second during tournament.

  7. Tournaments: Play-off mode, randomly paired, the winner enter the next round. Score calculation (Player A vs Player B): A move first: a : b B move first: c : d Final scores: (a + c : b + d) Illegal move or searching exceeds 1 sec will down your score to zero. The players after xxx round will receive bonus points!

  8. Note The game server can be only connected when you are using Campus Internet. If you want to debug outside of campus, using VPN or commenting line #43 at main.py.

Related


More Related Content