Question: I need this done in C. Assignment The objective of this lab is to write a 20-questions style guessing game that gets smarter as you

I need this done in C.
 I need this done in C. Assignment The objective of this
lab is to write a 20-questions style guessing game that gets smarter

Assignment The objective of this lab is to write a 20-questions style guessing game that gets smarter as you play. To achieve this you will create a decision tree data structure using mallocO and free0 Game Play When you run your program, it will be the guesser in a 20- questions game. First, you think of an animal, and the program will take a guess at what animal you are thinking of When you first start the program dog, so it will ask you ls it a dog?. If you were in fact thinking of a dog the program says "I win and exits. the only animal it knows is that your animal was not a dog, the On the off chance program will then ask what animal you were thinking of. Lets say it was a duck. The program will then ask "Please give me a yeso question that would distinguish between a dog and a duck. Let's assume you give the answer "Does it have fur?. It will then ask "Would the answer to this question be yes or no for a dog? The program will use this answer to build a small decision tree. Next time you run the program, it will ask Does it have fur?" If you say yes, it will guess dog if you say no it will guess duck. the decision tree and gets better at the game Each time you play, the program adds to If, for example, you play the following game Is it a dog? I lose What aninal were you thinking of s duck Please tive me a yeso uestion that dis Does it have fur? ould the anower to this question be yes on yes Thank youould you 1ske to play again? yen Does it have fur? ts it a duek I losef What aninal were yoa thinking of fish Please give se yeso queat Lon that dis Doe# it have feathers? ould the answer to this question be yes yes Thank youWould you like to play again no Assignment The objective of this lab is to write a 20-questions style guessing game that gets smarter as you play. To achieve this you will create a decision tree data structure using mallocO and free0 Game Play When you run your program, it will be the guesser in a 20- questions game. First, you think of an animal, and the program will take a guess at what animal you are thinking of When you first start the program dog, so it will ask you ls it a dog?. If you were in fact thinking of a dog the program says "I win and exits. the only animal it knows is that your animal was not a dog, the On the off chance program will then ask what animal you were thinking of. Lets say it was a duck. The program will then ask "Please give me a yeso question that would distinguish between a dog and a duck. Let's assume you give the answer "Does it have fur?. It will then ask "Would the answer to this question be yes or no for a dog? The program will use this answer to build a small decision tree. Next time you run the program, it will ask Does it have fur?" If you say yes, it will guess dog if you say no it will guess duck. the decision tree and gets better at the game Each time you play, the program adds to If, for example, you play the following game Is it a dog? I lose What aninal were you thinking of s duck Please tive me a yeso uestion that dis Does it have fur? ould the anower to this question be yes on yes Thank youould you 1ske to play again? yen Does it have fur? ts it a duek I losef What aninal were yoa thinking of fish Please give se yeso queat Lon that dis Doe# it have feathers? ould the answer to this question be yes yes Thank youWould you like to play again no

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 Databases Questions!