Skip to content

hyao03/Fuzzy_Tipping_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Fuzzy Logic Tipping Problem Project

Overview

This project uses fuzzy logic to recommend a tip amount based on service, food, income, and party size. Instead of strict thresholds, fuzzy logic uses degrees of membership to calculate reasonable yet concise solutions.

Features

  • Fuzzy Inputs: service quality (poor, average, good), food quality (terrible, average, delicious), income (low, medium, high), party size (small, medium, large)
  • Fuzzy Output: centroid defuzzification is used to calculate tip percentage (low, medium, high)
  • Fuzzy Rules:
    1. If service is poor OR food is terrible, then tip is low
    2. If service is good AND food is delicious, then tip is high
    3. If service is average AND food is average, then tip is medium
    4. If party size is large OR income is high, then tip is high
    5. If party size is small AND income is low, then tip is low
    6. If income is medium, then tip is medium
  • Membership Functions: Each fuzzy input is given a specified range, which is visualized in matplotlib

Requirements

Python 3.9 or Python 3.10

Installation

  1. Clone the repository: git clone https://github.com/hyao03/Fuzzy_Tipping_Project
  2. Install dependencies: pip install -r requirements.txt
  3. Run the program: python fuzzytipping.py

Output

  • Graphs for each membership function are displayed for the inputs and output
  • The final recommended tip percentage is displayed

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors