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 0 and 100).
Once the input is received, the program is going to generate 2 random numbers from 1 to 5 for the ammo and the health. (1 means very low, and 5 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.
\table[[,Ammo],[,Very Low,Low,Medium,High,Very High],[Very Low,HIDE,HIDE,\table[[RUN],[AWAY]],\table[[RUN],[AWAY]],STOP],[Medium,HIDE,\table[[RUN],[AWAY]],\table[[RUN],[AWAY]],STOP,\table[[WALK],[AROUND]]],[\table[[RUN],[AWAY]],\table[[RUN],[AWAY]],STOP,\table[[WALK],[AROUND]],\table[[WALK],[AROUND]]],[High,\table[[RUN],[AWAY]],STOP,\table[[WALK],[AROUND]],\table[[WALK],[AROUND]],ATTACK],[Very High,STOP,\table[[WALK],[AROUND]],\table[[WALK],[AROUND]],ATTACK,ATTACK]]
Build a C + + console application, in which you

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!