|
| 1 | +Package/Script Name: AI-driven AI Tron |
| 2 | + |
| 3 | +Short Description: AI-driven AI Tron is a Python script that implements an AI player for the game "AI Tron," also known as Snake or Light Cycles. The AI player uses the Alpha-Beta Pruning algorithm to make intelligent moves and maximize its chances of winning. |
| 4 | + |
| 5 | +Functionalities/Script: |
| 6 | + |
| 7 | +TronGame class: Represents the AI Tron game and handles game logic. |
| 8 | +AI_move(): Implements the AI's move using the Alpha-Beta Pruning algorithm. |
| 9 | +Heuristic evaluation function: Calculates the heuristic value for a given game state. |
| 10 | +Board representation: Displays the game board, paddles, and puck. |
| 11 | +Setup Instructions: |
| 12 | + |
| 13 | +Make sure you have Python installed on your system (Python 3.6 or higher). |
| 14 | +Install the required libraries using pip: |
| 15 | +bash |
| 16 | +Copy code |
| 17 | +pip install pygame |
| 18 | +Download the AI_tron.py file from the repository or package. |
| 19 | +Explanation of Script: |
| 20 | +The AI-driven AI Tron script implements a simple version of the Tron game, where two AI players compete against each other. The AI players use the Alpha-Beta Pruning algorithm to calculate their moves and avoid collisions while trying to eliminate the opponent. |
| 21 | + |
| 22 | +Usage: |
| 23 | + |
| 24 | +Run the AI_tron.py script. |
| 25 | +bash |
| 26 | +Copy code |
| 27 | +python AI_tron.py |
| 28 | +The game window will open, showing the AI players (paddles) and the puck (Tron bike). |
| 29 | +The AI players will automatically start moving and try to eliminate the opponent. |
| 30 | +Output: |
| 31 | +The AI-driven AI Tron script will display a window with the game board, AI players, and the puck. The AI players will move automatically based on the calculated moves using the Alpha-Beta Pruning algorithm. |
| 32 | + |
| 33 | +Author: |
| 34 | +Shikhar9425 |
0 commit comments