Software Design
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreSoftware Design

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 30th, 2004, 08:02 AM
mmc18 mmc18 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: in Turkiye
Posts: 10 mmc18 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 32 sec
Reputation Power: 0
finding sentence

ı will write a program that is like a game.
there is a sentence only ı know and computer try to find it.
from text document that 25.000 words in.
for instance my sentences is clock
and its first predict is microscop (this sentences is in the text document)
and ı will write 4.because 2-c and 2-o
how can ı write an algorithm.
thank for reading)

Reply With Quote
  #2  
Old March 31st, 2004, 12:43 PM
dog135's Avatar
dog135 dog135 is offline
Doggie
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2003
Location: Seattle, WA
Posts: 751 dog135 User rank is Corporal (100 - 500 Reputation Level)dog135 User rank is Corporal (100 - 500 Reputation Level)dog135 User rank is Corporal (100 - 500 Reputation Level)dog135 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 10 h 38 m 25 sec
Reputation Power: 7
Ok, first, "clock" is a word, not a sentence.

You may have messed up a bit with your example, is this right:?

word: clock
guess: microscope
hint: 3 (2 matches on "c" and 1 match on "o")

This is very similar to an old game. I forget what it's called, but you used color pegs and try to guess what the other person made for a pattern. On each turn, you'd make a guess, and they'd tell you how many colors where correct, and how many colors where also in the right order.

The algorithm wouldn't be easy. There's a lot of combinations using any 3 letters out of "microscope" to make new words. You'd have to keep a history and compare it to new information. The computer should try to guess with the smallest words possible with the letters it chooses to work with, otherwise there's too many possibilities.

So the computer's next guess, if it decides to use "mic" as it's letters, should probably be "chime", not a longer word like "microphone". It should probably also try to use words with fewer duplicate letters from it's previous guesses. That way, it's be easier to narrow down which letters are the correct ones. ie: "microscopic" doesn't give you much more information then "microscope" did.
__________________
"Science is constructed of facts as a house is of stones. But a collection of facts is no more a science than a heap of stones is a house." - Henri Poincare

Reply With Quote
  #3  
Old March 31st, 2004, 05:05 PM
DaWei_M's Avatar
DaWei_M DaWei_M is offline
Permanently Banned
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Jan 2004
Location: Central New York. Texan via Arizona, out of his element!
Posts: 7,351 DaWei_M User rank is Sergeant (500 - 2000 Reputation Level)DaWei_M User rank is Sergeant (500 - 2000 Reputation Level)DaWei_M User rank is Sergeant (500 - 2000 Reputation Level)DaWei_M User rank is Sergeant (500 - 2000 Reputation Level)DaWei_M User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Weeks 1 Day 19 h 39 m 7 sec
Warnings Level: 10
Number of bans: 1
Reputation Power: 0
Cogent analysis, doggie, and a vote for neural networks :-).

Reply With Quote
  #4  
Old April 2nd, 2004, 06:29 AM
ishnid's Avatar
ishnid ishnid is online now
kill 9, $$;
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Sep 2001
Location: Dublin, Eire
Posts: 5,697 ishnid User rank is General 8th Grade (Above 100000 Reputation Level)ishnid User rank is General 8th Grade (Above 100000 Reputation Level)ishnid User rank is General 8th Grade (Above 100000 Reputation Level)ishnid User rank is General 8th Grade (Above 100000 Reputation Level)ishnid User rank is General 8th Grade (Above 100000 Reputation Level)ishnid User rank is General 8th Grade (Above 100000 Reputation Level)ishnid User rank is General 8th Grade (Above 100000 Reputation Level)ishnid User rank is General 8th Grade (Above 100000 Reputation Level)ishnid User rank is General 8th Grade (Above 100000 Reputation Level)ishnid User rank is General 8th Grade (Above 100000 Reputation Level)ishnid User rank is General 8th Grade (Above 100000 Reputation Level)ishnid User rank is General 8th Grade (Above 100000 Reputation Level)ishnid User rank is General 8th Grade (Above 100000 Reputation Level)ishnid User rank is General 8th Grade (Above 100000 Reputation Level)ishnid User rank is General 8th Grade (Above 100000 Reputation Level)ishnid User rank is General 8th Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Months 1 Week 6 Days 22 h 11 m 4 sec
Reputation Power: 1507
Quote:
Originally Posted by dog135
This is very similar to an old game. I forget what it's called, but you used color pegs and try to guess what the other person made for a pattern. On each turn, you'd make a guess, and they'd tell you how many colors where correct, and how many colors where also in the right order.


Mastermind - Now you can sleep easy!

Reply With Quote
  #5  
Old April 5th, 2004, 12:59 PM
dog135's Avatar
dog135 dog135 is offline
Doggie
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2003
Location: Seattle, WA
Posts: 751 dog135 User rank is Corporal (100 - 500 Reputation Level)dog135 User rank is Corporal (100 - 500 Reputation Level)dog135 User rank is Corporal (100 - 500 Reputation Level)dog135 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 10 h 38 m 25 sec
Reputation Power: 7
Quote:
Originally Posted by ishnid
Mastermind - Now you can sleep easy!


Provide a link, man!

Written in Java:
http://www.javaonthebrain.com/java/mastermind/

Hope that helps the original poster.

Reply With Quote
  #6  
Old April 8th, 2004, 05:12 PM
red hot sheep red hot sheep is offline
Moderator
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2004
Location: UK
Posts: 928 red hot sheep User rank is Sergeant (500 - 2000 Reputation Level)red hot sheep User rank is Sergeant (500 - 2000 Reputation Level)red hot sheep User rank is Sergeant (500 - 2000 Reputation Level)red hot sheep User rank is Sergeant (500 - 2000 Reputation Level)red hot sheep User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 11 h 48 m 33 sec
Reputation Power: 13
Send a message via MSN to red hot sheep
Quote:
guess: microscope
hint: 3 (2 matches on "c" and 1 match on "o")


hmm... i think you mean 2 matches on "o"!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreSoftware Design > finding sentence


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT