Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 16 Online
OpenStudy (anonymous):

Hi guys, I'm doing the 2008 Intro to Computer science, and I'm looking for someone to give me a clue about Problem Set 6, problem #4. This is insane and I'm totally lost. Don't even know how to start answering. Can anyone lend a hand? Michelle

OpenStudy (mathmate):

@hakabuk Is it a new problem or a follow-up/continuous to the previous? If it is a new one, it would be appreciated if you could post: 1. The objective of the code (what it is supposed to do) 2. your intended algorithm, unless it is trivial 3. your code, and 4. problems/comments, if any This will expedite any required help! :)

OpenStudy (turingtest):

Yes, though we have a section just for this class, I doubt anybody here knows the course entirely by heart. For that reason it's great if you can actually provide a link to or attach all relevant information, thanks.

OpenStudy (rsmith6559):

The Scrabble.play_hand(hand, word_list) ? You're given the player's hand, and a list of legal words. Like any function, init you're variables. Display a display, there are requirements in the direction. Get the user's guess, check if it's the sentinel value, if it's not check if it's legit. If it's legit, do some accounting ( remove the letters from hand and add their value to score ). Repeat.

OpenStudy (anonymous):

Oops, sorry guys, you're right. It's the second part of the word game, and the problem is called: "Even faster computer player". My English is not bad, but for some reason - this problem is really hard for me. Don't even know where to start. Is it saying I should put the entire text file in a dictionary? Why is that faster/better than approaching it in a file? Are there similar problems, easier problems, that I can do before this one? Just to get the hang of it? Thanks again for before, and in advance etc. Michelle

OpenStudy (anonymous):

And to be more specific - after I've created a game and an option to play the game against the computer - this problem requires a faster way to approach the words, and I'm advised to put the words in a dictionary.

OpenStudy (turingtest):

Consider that most words in the "wordlist" you are given can't be made from the letters in your hand, because they have a letter that you don't have in your hand, for instance. So your program can check each word in the wordlist, and as soon as it finds (for example) a letter that is not in your hand, it checks the next word. Otherwise, if the word can be formed from the letters in your hand, you put it in a dictionary. The rest of the words the computer then chooses for the rest of that hand come only from the dictionary of possible words, and so it will not have to search the entire wordlist for each next move.

OpenStudy (anonymous):

Oh, I see. You really gave me something to start with, I hope I can take if from here : ) Cheers, Michelle

OpenStudy (turingtest):

good luck!

OpenStudy (anonymous):

Will need it. Thanks again for the quick response!

OpenStudy (anonymous):

I found that problem confusing also. After reading and re-reading it, I finally looked at the solution. The solution code seemed to be totally unrelated to the problem. I think they need to re-write that question.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!