Results 1 to 11 of 11
Thread: Animal Vegetable Mineral Game
- 12-01-2011, 10:21 PM #1
Member
- Join Date
- Oct 2011
- Posts
- 19
- Rep Power
- 0
Animal Vegetable Mineral Game
I have to complete a college assignment where we create a JAVA game based on the Animal Vegetable Mineral Game. The user thinks of an object and the program tries to guess it. I'm fine with the coding of it, I just can't get my head around how to design the game. We have to use binary trees. So what I am thinking for every true answer it goes left node and every false answer it goes to the right node. Then at the bottom of the stem (not sure if that is correct terminology!) is the answer.
If the guess is wrong the user is asked what they were thinking and what differentiates the guess from the object and then this question is added to the binary tree. In this way it gains 'artificial intelligence'
We have to save the binary tree to disk and then open it up every time a new user uses the program. What I am struggling to get my head around is how to save the questions and answers in such a way that the program knows which one is to be asked next. If anyone has any ideas I would really appreciate it. Even subtle hints would be appreciated.
- 12-01-2011, 10:34 PM #2
Re: Animal Vegetable Mineral Game
You could use Serialization.
- 12-01-2011, 10:36 PM #3
Member
- Join Date
- Oct 2011
- Posts
- 19
- Rep Power
- 0
Re: Animal Vegetable Mineral Game
Thanks for that. I'll have a look into the serialization now. Just so you know what standard I'm at I only took up Java in September and do 2 lecture a week so the more basic the better!
- 12-01-2011, 10:49 PM #4
Re: Animal Vegetable Mineral Game
That looks like an advanced project for a beginning programmer. What programming and logic background is required for this course you are taking?
- 12-01-2011, 10:51 PM #5
Member
- Join Date
- Oct 2011
- Posts
- 19
- Rep Power
- 0
Re: Animal Vegetable Mineral Game
Yup, They love throwing us in the deep end! I do computing which is basically coding for ARM processors and then I also do JAVA programming. So far Ive done simple programs, counting palindromes, reading sums from a file and calculating, saving numbers to a binary tree so this is a massive jump.
- 12-01-2011, 10:58 PM #6
Re: Animal Vegetable Mineral Game
To me the design work on this program is hugh. There must be some simplifying assumptions you can make to make the assignment more reasonable.
- 12-01-2011, 11:00 PM #7
Member
- Join Date
- Oct 2011
- Posts
- 19
- Rep Power
- 0
Re: Animal Vegetable Mineral Game
Our outline was:
Your assignment is to research, design & implement an AVM system that exhibits the following properties:
That provides a clean and simple console based interface.
That is not limited to a fixed set of categories (eg. animal, mineral, vegtable, sport, book, ...)
Can store new knowledge from execution to execution.
That can obtain and store refinements following incorrect guesses, so that these object can be correctyl guessed in future.
that can list the set of possible things the program is presently considering if the user responds:
+++ does it have fur?
list
+++ I think it might be a monkey, a bird, or a cow.
+++ does it have fur?
That presented with the name of an object, can print out the questions the program would ask, and indicate how many questions would be necessary.
That is designed as a set of classes.
- 12-01-2011, 11:06 PM #8
Re: Animal Vegetable Mineral Game
Most of the work for this program will be the design. Once you have that, the programming will probably very straight forward.
- 12-01-2011, 11:31 PM #9
Member
- Join Date
- Oct 2011
- Posts
- 19
- Rep Power
- 0
Re: Animal Vegetable Mineral Game
Yup, been bugging me for days. I know I'd be able to code it but it's just the planning that I can't do. I suppose I'll need to work these things out in the future too so will be good practise. Any hints would be brilliant though!
- 12-06-2011, 11:54 AM #10
Member
- Join Date
- Oct 2011
- Posts
- 19
- Rep Power
- 0
Re: Animal Vegetable Mineral Game
Still struggling to get to grips on how to save the binary tree to file. Would any one have any suggestions as to how I could go about saving the tree?
Thanks in advance.
- 12-06-2011, 02:03 PM #11
Similar Threads
-
Complete Game Engine for beginner and intermediate game programmers
By rdjava in forum Java GamingReplies: 1Last Post: 06-02-2011, 09:29 AM -
Implementing "Game Over" in Minesweeper game based on Gridworld framework.
By JFlash in forum New To JavaReplies: 2Last Post: 08-05-2010, 04:49 AM -
game code for any game
By deathnote202 in forum Java GamingReplies: 4Last Post: 06-10-2010, 08:06 AM -
2D strategy game or 2D war game
By led1433 in forum Java 2DReplies: 5Last Post: 02-10-2009, 06:00 AM -
Animal Shelter Manager 2.0.22
By JavaBean in forum Java SoftwareReplies: 0Last Post: 07-01-2007, 09:11 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks