Question: Gaming Problem statement 2 : Logic Create a basic medical diagnosis system using Prolog. The system will diagnose common illnesses based on a set of

Gaming Problem statement 2: Logic
Create a basic medical diagnosis system using Prolog. The system will diagnose common illnesses based
on a set of symptoms provided by the user. The focus is on using Prolog to define facts and rules that allow
for the diagnosis of illnesses, followed by querying the system to derive possible diagnoses.
Problem statement
The goal is to develop a Prolog-based medical diagnosis system that can identify whether a patient might
be suffering from one of the following conditions based on their symptoms:
Common Cold
Flu
Allergy
Strep Throat
Symptoms and Diagnoses
Each illness has a set of associated symptoms:
Common Cold
o Symptoms: Runny nose, sneezing, sore throat,
Title: Implement a Two-Player Connect Four Game with Fixed Depth Minimax
You are required to develop a Simple-Connect-Four game on a 7x6 grid where a human plays
against a computer.
Requirements:
Grid Representation: Represent the 7x6 grid using a 2D array.
Human Player: Allow the human player to select a column to drop their disc. Ensure that the
selected column is not full.
Computer Player: Implement the Minimax algorithm for the computer's moves with a fixed depth
of 3. The algorithm should consider factors like winning, blocking, and strategic positioning.
Game Logic: Alternate turns between the human and the computer. After each move, update the
grid and check for a win (four in a row horizontally, vertically, or diagonally) or a draw (all
columns are filled).
Output: Display the grid after each move and announce the winner or declare a draw when the
game ends.
Rules to Play Connect Four:
1. Objective: Connect four of your discs in a row horizontally, vertically, or diagonally on a
7x6 grid.
2. Turns: Players take turns to drop discs into one of the seven columns. The disc falls to the
lowest available slot in that column.
3. End Game: The game ends when a player connects four discs in a row or the grid is full,
resulting in a draw.
Sample Moves:
Move 1: Player 1 drops a disc into column 3; it falls to the bottom.
Move 2: Player 2 drops a disc into column 4; it falls to the bottom.
Move 3: Player 1 drops another disc into column 3; it stacks on top of their first disc.
a. You are free to choose your own static evaluation function. Justify your choice of static
evaluation value design and explain with a sample game state. Do not use any machine learning
model for the evaluation function.
b. In the Connect Four game, one player must be a human and provide dynamic inputs during
gameplay. The other player will be simulated by the program using the Minimax algorithm with a
fixed depth. The game should alternate turns between the human player and the computer,
displaying the updated game state after each move.
c. Implement Python code for the design under part a, using Minimax Algorithm.
----------------------------------------------------------------------------------------------------------
Problem statement 2: Logic
Create a basic medical diagnosis system using Prolog. The system will diagnose common illnesses based
on a set of symptoms provided by the user. The focus is on using Prolog to define facts and rules that allow
for the diagnosis of illnesses, followed by querying the system to derive possible diagnoses.
Problem Statement
The goal is to develop a Prolog-based medical diagnosis system that can identify whether a patient might
be suffering from one of the following conditions based on their symptoms:
1. Common Cold
2. Flu
3. Allergy
4. Strep Throat
Symptoms and Diagnoses
Each illness has a set of associated symptoms:
1. Common Cold
o Symptoms: Runny nose, sneezing, sore throat, mild fever
2. Flu
o Symptoms: High fever, body aches, fatigue, cough, sore throat
3. Allergy
o Symptoms: Runny nose, sneezing, itchy eyes, skin rash
4. Strep Throat
o Symptoms: Sore throat, high fever, swollen lymph nodes, white spots on tonsils
After defining the rules and querying the system, extend this into a decision tree for more complex or
interactive diagnosis:
1. Root Node: Start by checking if the patient has a fever.
o If mild fever: Check for symptoms related to the common cold.
o If high fever: Check further for flu or strep throat.
2. Branches: Each branch of the decision tree can represent a symptom check.
o Example: If the patient has a runny nose and sneezing but no fever, check for allergies.
3. Leaf Nodes: The leaf nodes would represent a final diagnosis, such as "Common Cold," "Flu,"
"Allergy," or "Strep Throat."
Evaluations will be based on the following.
1. Use Min-Max algorithm and implement the game in PYTHON
2. Derive the rules from the given decision tree and code as Prolog rules.
3. Interactive implementation. Dynamic inputs-based run of the game with step wise
board display and error free game ending.
4. Interactive implementation. Dynamic inputs-based run of the logic expert system with
step wise options display and error free recommendation & ending.
Gaming Problem statement 2 : Logic Create a basic

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!