A simple Rule-Based AI Chatbot built using Python. This chatbot responds to predefined user inputs using if-elif-else statements and demonstrates the basic concepts of Artificial Intelligence without using Machine Learning or external APIs.
This project was developed to understand the fundamentals of AI by implementing a chatbot that follows predefined rules instead of learning from data.
The chatbot continuously interacts with users, recognizes various commands, and provides appropriate responses based on programmed conditions.
- Interactive command-line chatbot
- Continuous conversation using a
whileloop - Handles 50+ predefined user intents
- Greeting and farewell commands
- Study and programming tips
- AI and Machine Learning related questions
- Fun responses (jokes and facts)
- User-friendly help menu
- Handles uppercase/lowercase inputs
- Ignores common punctuation marks
- Beginner-friendly code structure
- Python 3
- VS Code
- Git
- GitHub
Rule-Based-AI-Chatbot/
│
├── assets/
│
├── chatbot.py
├── chatbot_v2.py
├── README.md
├── requirements.txt
└── .gitignore
git clone <repository-url>cd Rule-Based-AI-Chatbotpy chatbot.py- hello
- hi
- hey
- good morning
- good afternoon
- good evening
- good night
- who are you
- what is your name
- who created you
- who is your owner
- how old are you
- where are you from
- what is ai
- what is artificial intelligence
- what is machine learning
- what is deep learning
- what is python
- what is java
- what is c++
- what is javascript
- what is html
- what is css
- what is react
- study tips
- programming tips
- coding tips
- exam tips
- motivate me
- quote
- tell me a joke
- tell me another joke
- fun fact
- weather
- time
- date
- favorite color
- favorite programming language
- favorite food
- favorite movie
- bye
- goodbye
- exit
- quit
- see you
=============================================================
🤖 Welcome to the Rule-Based AI Chatbot
=============================================================
You: hello
Bot: Hello! How can I help you today?
You: what is python
Bot: Python is a beginner-friendly programming language used
for AI, web development, automation, and data science.
You: tell me a joke
Bot: Why do programmers prefer dark mode?
Bot: Because light attracts bugs!
You: bye
Bot: Thank you for chatting with me!
Bot: Goodbye! Have a wonderful day.
This project demonstrates the following Python concepts:
- Variables
- User Input
- Output Statements
- Conditional Statements
if-elif-else- Infinite Loops
break- String Manipulation
- Input Sanitization
- Decision Making
- Dictionary-based chatbot
- GUI using Tkinter
- Voice-enabled chatbot
- Natural Language Processing (NLP)
- Machine Learning integration
- API integration
- Chat history
- Database support
Hadeed Jalani
Computer Science Student
Python | AI | Machine Learning | Web Development
Give this repository a ⭐ on GitHub.