Various Python projects I completed for my Artificial Intelligence course at NEIU.
Eliza:
Eliza implements a simple therapist chatbot called "Eliza" that interacts with users through basic text-based conversations. The chatbot recognizes user inputs related to feelings, relationships, and verbs, and provides appropriate responses. The program uses Python’s re library for regular expression matching and random for dynamic response generation. This project demonstrates basic natural language processing concepts like pattern matching and conditional dialogue generation.
Generating Plotting Data:
Generating Plotting Data generates synthetic data to model the relationship between years of education and income, visualized using scatter plots. It demonstrates a positive linear correlation between the two variables, with varying levels of noise to illustrate how randomness impacts the clarity of the relationship. The project uses NumPy to generate the data and Matplotlib for plotting, showing how different noise scales affect the visibility of the linear trend.
MinimaxCheckers:
MinimaxCheckers is a simple python-based checkers game. The game pits a user against an AI using the minimax algorithm with alpha-beta pruning. The program handles move validation, scoring, and basic game mechanics like capturing opponent pieces. The AI calculates the optimal moves by simulating different game states to maximize its advantage, while the user plays against the computer to be the first to reach 5 points. The program showcases AI-based decision-making in a classic board game setting.
Optimizing ML Algorithms:
Optimizing ML Algoithms is a python implementation of linear regression using gradient descent. The code explores different learning rates and iteration values to demonstrate their effect on model convergence and stability.
Poker:
Poker is a basic python poker game simulation where two players are dealt hands from a shuffled deck of cards. The total points of each hand are calculated, with face cards having a value of 10 and aces being worth 11 points. The game determines the winner based on the total points, and ties are possible.
Relationships:
Relationships is a python program that checks the relationship between two lists, determining if one is a sublist, superlist, if they are equal, or if they are completely unequal. It includes helper functions to identify sublists within lists and provides straightforward results for a variety of list comparisons.
String AI:
String AI is a python program that uses a genetic algorithm to evolve a population of strings toward a target phrase. Through selection, crossover, and mutation, the program simulates natural evolution over generations to find the optimal match for the given string. It tracks the fitness of each individual and visualizes fitness progression over generations.