updated AI Chess Agent
This commit is contained in:
parent
2a3f173a90
commit
84fb330a24
4 changed files with 46 additions and 31 deletions
46
ai_agent_tutorials/ai_chess_agent/README.md
Normal file
46
ai_agent_tutorials/ai_chess_agent/README.md
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
# ♜ Agent White vs Agent Black: Chess Game
|
||||||
|
|
||||||
|
An advanced Chess game system where two AI agents play chess against each other using Autogen in a streamlit app. It is built with robust move validation and game state management.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
### Multi-Agent Architecture
|
||||||
|
- Player White: OpenAI-powered strategic decision maker
|
||||||
|
- Player Black: OpenAI-powered tactical opponent
|
||||||
|
- Board Proxy: Validation agent for move legality and game state
|
||||||
|
|
||||||
|
### Safety & Validation
|
||||||
|
- Robust move verification system
|
||||||
|
- Illegal move prevention
|
||||||
|
- Real-time board state monitoring
|
||||||
|
- Secure game progression control
|
||||||
|
|
||||||
|
### Strategic Gameplay
|
||||||
|
- AI-powered position evaluation
|
||||||
|
- Deep tactical analysis
|
||||||
|
- Dynamic strategy adaptation
|
||||||
|
- Complete chess ruleset implementation
|
||||||
|
|
||||||
|
|
||||||
|
### How to get Started?
|
||||||
|
|
||||||
|
1. Clone the GitHub repository
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git
|
||||||
|
cd ai_agent_tutorials/ai_chess_game
|
||||||
|
```
|
||||||
|
2. Install the required dependencies:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pip install -r requirements.txt
|
||||||
|
```
|
||||||
|
3. Get your OpenAI API Key
|
||||||
|
|
||||||
|
- Sign up for an [OpenAI account](https://platform.openai.com/) (or the LLM provider of your choice) and obtain your API key.
|
||||||
|
|
||||||
|
4. Run the Streamlit App
|
||||||
|
```bash
|
||||||
|
streamlit run ai_chess_agent.py
|
||||||
|
```
|
||||||
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
# AI Chess Game - Autogen
|
|
||||||
|
|
||||||
This is a simple Chess game that uses an AI agents - Player black and player white to play the game. There's also a board proxy agent to execute the tools and manage the game. It is important to use a board proxy as a non-LLM "guard rail" to ensure the game is played correctly and to prevent agents from making illegal moves.
|
|
||||||
|
|
||||||
Two agents (agent_white and agent_black) are initialized using the OpenAI API key. These agents are configured to play chess as white and black, respectively.
|
|
||||||
A board_proxy agent is created to manage the board state and validate moves.
|
|
||||||
Functions (make_move and available_moves) are registered with the agents to allow them to interact with the board.
|
|
||||||
|
|
||||||
|
|
||||||
### How to get Started?
|
|
||||||
|
|
||||||
1. Clone the GitHub repository
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git
|
|
||||||
cd ai_agent_tutorials/ai_chess_game
|
|
||||||
```
|
|
||||||
2. Install the required dependencies:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
pip install -r requirements.txt
|
|
||||||
```
|
|
||||||
3. Get your OpenAI API Key
|
|
||||||
|
|
||||||
- Sign up for an [OpenAI account](https://platform.openai.com/) (or the LLM provider of your choice) and obtain your API key.
|
|
||||||
|
|
||||||
4. Run the Streamlit App
|
|
||||||
```bash
|
|
||||||
streamlit run ai_chess_agents.py
|
|
||||||
```
|
|
||||||
|
|
||||||
Loading…
Reference in a new issue