Disclaimer: This project is currently in development and is built for testing purposes only. Features may be incomplete or subject to change. Use at your own discretion.
A Texas Hold'em poker game where you play against AI opponents powered by OpenAI's GPT-4. Each AI player has a unique personality and playing style, making for an engaging and challenging poker experience.
- Play Texas Hold'em poker against 1-7 AI opponents
- AI players powered by GPT-4 with different personalities and playing styles
- Professional analysis and feedback after each round
- Real-time game state visualization
- Detailed hand evaluation and showdown results
- Responsive design that works on desktop and mobile
- Animated card dealing and chip movements
- Round history tracking
- Betting validation and pot management
- Node.js (v14 or higher)
- npm (v6 or higher)
- OpenAI API key
- Clone the repository:
git clone [repository-url]
cd poker-ai
- Install dependencies:
npm install
- Start the development server:
npm start
- Open http://localhost:3000 in your browser.
- Each player starts with 400 chips
- Small blind: 1 chip
- Big blind: 2 chips
- Standard Texas Hold'em rules apply
- Players can fold, check, call, or raise
- Game ends when a player loses all chips
The AI players are powered by OpenAI's GPT-4 and have different personalities:
- Aggressive: More likely to raise and bluff
- Conservative: Plays tight, only bets with strong hands
- Balanced: Uses a mix of strategies
- Unpredictable: Randomly changes playing style
- Mathematical: Makes decisions based on pot odds and probabilities
After each round, you'll receive:
- Detailed analysis of your gameplay
- Key decision points and their impact
- Suggestions for improvement
- Performance rating
- Strategic advice for future rounds
- React
- TypeScript
- Redux Toolkit
- Tailwind CSS
- OpenAI API
- Web Animations API
src/
├── components/ # React components
├── store/ # Redux store and slices
├── services/ # AI player service
├── utils/ # Poker game utilities
└── types/ # TypeScript type definitions
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Create a .env
file in the root directory with the following variables:
REACT_APP_OPENAI_API_KEY=your_api_key_here
- The OpenAI API key is stored locally in the browser's localStorage
- No game data is stored on any server
- All AI processing is done through secure API calls
- No personal information is collected or stored
- Lazy loading of components
- Memoization of expensive calculations
- Efficient state management with Redux
- Optimized animations using CSS transforms
- Minimal re-renders using React.memo and useMemo
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- Maximum of 8 players (1 human + 7 AI)
- Requires stable internet connection for AI interactions
- Mobile experience may be limited on smaller screens
- Multi-human player support
- Tournament mode
- Hand history export
- Advanced statistics tracking
- Custom AI personality creation
- Offline mode with pre-trained models
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for providing the GPT-4 API
- The React and Redux teams
- The Tailwind CSS team
- All contributors and testers
For support, please open an issue in the GitHub repository or contact the maintainers.