AI-Powered Golf Club Recommendation System
Ai Caddy is an intelligent web application that uses machine learning to help golfers make smarter club selections on the course. By analyzing your historical shot data, Ai Caddy provides personalized club recommendations based on distance, lie, hole conditions, and your playing style.
- K-Nearest Neighbors (KNN) Algorithm: Analyzes your past shots to recommend the best club for your current situation
- Multi-Factor Analysis: Considers distance to hole, lie (fairway/rough/tee box), hole bend, and shot shape
- Confidence Scoring: Each recommendation includes confidence levels (High/Medium/Low) based on data quality
- Fallback Logic: Automatically recommends your furthest club when input yardage exceeds historical data
- Club Statistics: Track average distances for each club from different lies
- Consistency Metrics: Standard deviation calculations show shot consistency
- Round History: View detailed statistics for all your recorded rounds
- Visual Analytics: Interactive visualizations showing shot clustering in feature space
- On-Course Data Entry: Use your phone's GPS to automatically measure shot distances
- Seamless Integration: Quick and easy shot entry while playing
- Multi-Device Support: Import data from popular launch monitors:
- Garmin R10
- SkyTrak+
- Flightscope Mevo+
- Arccos Caddie
- Generic Launch Monitor
- CSV Import: Bulk import shot data from CSV files
- Data Preview: Review and confirm imported data before adding to your database
- Responsive Design: Fully optimized for desktop, tablet, and mobile devices
- Pixel Art Theme: Retro-inspired design with Masters Tournament color scheme
- Mobile-First: Card-based layouts for easy viewing on smartphones
- Intuitive Navigation: Clean, user-friendly interface
- Django 5.2.7 - High-level Python web framework
- PostgreSQL - Production database (SQLite for development)
- scikit-learn - Machine learning library (KNN algorithm)
- NumPy - Numerical computing
- python-decouple - Environment variable management
- HTML5/CSS3 - Modern web standards
- JavaScript - Client-side interactivity
- Plotly.js - Data visualization
- Google Fonts - Press Start 2P (pixel font)
- Gunicorn - Python WSGI HTTP Server
- WhiteNoise - Static file serving
- Render.com - Cloud hosting platform
- Python 3.11 or higher
- pip (Python package manager)
- PostgreSQL (for production) or SQLite (for development)
- Git
-
Clone the repository
git clone https://github.com/grantjones-526/Ai-Caddy.git cd Ai-Caddy -
Create a virtual environment
python -m venv venv # On Windows venv\Scripts\activate # On macOS/Linux source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables
Create a
.envfile in the project root:SECRET_KEY= DEBUG=True DB_USE_SQLITE=True # For PostgreSQL (production) # DB_USE_SQLITE=False # DB_NAME=aicaddy_db # DB_USER= # DB_PASSWORD= # DB_HOST=localhost # DB_PORT=5432
-
Run database migrations
python manage.py migrate
-
Create a superuser (optional)
python manage.py createsuperuser
-
Collect static files
python manage.py collectstatic
-
Run the development server
python manage.py runserver
-
Access the application
Open your browser and navigate to
http://localhost:8000
- Sign Up: Create a new account
- Default Clubs: A default set of clubs is automatically added to your bag
- Add Rounds: Start tracking your golf rounds
- Navigate to "Add Round" from the dashboard
- Enter course name and date
- Add shots manually or use GPS tracking:
- Manual Entry: Select club, distance, lie, and shot shape
- GPS Tracking: Use your phone's GPS to measure distances automatically
- Save your round
- Go to "Get Recommendation"
- Enter:
- Distance to hole (yards)
- Lie (Fairway, Rough, Tee Box, or Sand)
- Hole bend (Straight, Left, or Right)
- Shot shape preference (Straight, Fade, Draw, Slice, or Hook)
- Click "Get Recommendation"
- Review the top 3 club recommendations with confidence scores
- Navigate to "Import Launch Monitor"
- Select your device type
- Upload your CSV file
- Review the preview
- Confirm import
- Dashboard: View club performance averages and consistency metrics
- Round Detail: Click on any round to see detailed shot information
- Visualizations: Explore interactive charts showing your shot patterns
aicaddy/
├── aicaddy/ # Django project settings
│ ├── settings.py # Configuration
│ ├── urls.py # URL routing
│ └── wsgi.py # WSGI config
├── dashboard/ # Main application
│ ├── models.py # Database models
│ ├── views.py # View logic
│ ├── urls.py # App URLs
│ ├── parsers.py # Launch monitor parsers
│ └── templates/ # HTML templates
├── static/ # Static files
│ └── dashboard/
│ ├── css/ # Stylesheets
│ └── images/ # Images
├── build.sh # Deployment script
├── Procfile # Process file for Render
├── requirements.txt # Python dependencies
└── manage.py # Django management script
This project is licensed under the MIT License - see the LICENSE file for details.
- Masters Tournament - Color scheme inspiration
- Google Fonts - Press Start 2P font
- Django Community - Excellent documentation and support
- scikit-learn - Powerful machine learning tools
For questions, suggestions, or support, please open an issue on GitHub. Or contact grantjones526@outlook.com
- Advanced analytics dashboard
- Weather condition integration
- Multi-user round sharing
- Mobile app (iOS/Android)
- Integration with more launch monitors
- Shot trajectory visualization
- Course-specific recommendations