Question: Build a C + + console application, in which you are going to simulate the following fuzzy logic for a character with health and ammo
Build a C console application, in which you are going to simulate the following fuzzy logic for a character with health and ammo state variables.
Once the program starts, it will ask the user to enter a seed number any number between and
Once the input is received, the program is going to generate random numbers from to for the ammo and the health. means very low, and means very high
Then the program will print to the user the generated ammo and health levels Very low, Low, Medium, High, Very High
The program will display the output action as well for the character, based on the fuzzy logic rules shown in the table below.
tableAmmoVery Low,Low,Medium,High,Very HighVery Low,HIDE,HIDE,tableRUNAWAYtableRUNAWAYSTOPMediumHIDE,tableRUNAWAYtableRUNAWAYSTOP,tableWALKAROUNDtableRUNAWAYtableRUNAWAYSTOP,tableWALKAROUNDtableWALKAROUNDHightableRUNAWAYSTOP,tableWALKAROUNDtableWALKAROUNDATTACKVery High,STOP,tableWALKAROUNDtableWALKAROUNDATTACK,ATTACK
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
