Skip to content

Repository files navigation

Ai Caddy

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.

Live Demo Django Python License


Features

Smart Recommendations

  • 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

Performance Tracking

  • 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

GPS Shot Tracking

  • On-Course Data Entry: Use your phone's GPS to automatically measure shot distances
  • Seamless Integration: Quick and easy shot entry while playing

Launch Monitor Integration

  • 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

Modern UI/UX

  • 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

Tech Stack

Backend

  • 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

Frontend

  • HTML5/CSS3 - Modern web standards
  • JavaScript - Client-side interactivity
  • Plotly.js - Data visualization
  • Google Fonts - Press Start 2P (pixel font)

Deployment

  • Gunicorn - Python WSGI HTTP Server
  • WhiteNoise - Static file serving
  • Render.com - Cloud hosting platform

Getting Started

Prerequisites

  • Python 3.11 or higher
  • pip (Python package manager)
  • PostgreSQL (for production) or SQLite (for development)
  • Git

Installation

  1. Clone the repository

    git clone https://github.com/grantjones-526/Ai-Caddy.git
    cd Ai-Caddy
  2. Create a virtual environment

    python -m venv venv
    
    # On Windows
    venv\Scripts\activate
    
    # On macOS/Linux
    source venv/bin/activate
  3. Install dependencies

    pip install -r requirements.txt
  4. Set up environment variables

    Create a .env file 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
  5. Run database migrations

    python manage.py migrate
  6. Create a superuser (optional)

    python manage.py createsuperuser
  7. Collect static files

    python manage.py collectstatic
  8. Run the development server

    python manage.py runserver
  9. Access the application

    Open your browser and navigate to http://localhost:8000


Usage

First Time Setup

  1. Sign Up: Create a new account
  2. Default Clubs: A default set of clubs is automatically added to your bag
  3. Add Rounds: Start tracking your golf rounds

Adding Rounds

  1. Navigate to "Add Round" from the dashboard
  2. Enter course name and date
  3. 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
  4. Save your round

Getting Recommendations

  1. Go to "Get Recommendation"
  2. 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)
  3. Click "Get Recommendation"
  4. Review the top 3 club recommendations with confidence scores

Importing Launch Monitor Data

  1. Navigate to "Import Launch Monitor"
  2. Select your device type
  3. Upload your CSV file
  4. Review the preview
  5. Confirm import

Viewing Statistics

  • 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

Project Structure

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

License

This project is licensed under the MIT License - see the LICENSE file for details.


Acknowledgments

  • Masters Tournament - Color scheme inspiration
  • Google Fonts - Press Start 2P font
  • Django Community - Excellent documentation and support
  • scikit-learn - Powerful machine learning tools

Contact

For questions, suggestions, or support, please open an issue on GitHub. Or contact grantjones526@outlook.com


Roadmap

  • 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

About

CS500 Project

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages