| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | On The Computer Too Long |
Hi G
GG> YOU KNOW YOU'VE BEEN ON THE COMPUTER TOO LONG...
you've been programming in Prolog, and suddenly you can't
turn from page 1 to page 2 of the newspaper without
calling a recursion algorithm.
Background: a while ago, I wrote a Moo (original version of the 4
digit guessing game since named Mastermind) "host" program in
Prolog, that thought up the number and scored the punter's guesses
with Bulls for direct hits and Cows for correct digit but wrong
place. A typical score for an intelligent human is 6 guesses,
sometimes 7, with luck 5 or less. (these scores are from
experience, our 3rd and 4th yr class used to play this game on the
blackboard between lectures (along with 3d noughts and crosses))
Now I'm trying to write a Moo Player, that can match a human's
score of 6 or 7 guesses, in Prolog. This is *not* easy. I think
Prolog (or one of its relatives) is the best language to use for
this problem, but after years of C(++) programming, Prolog has
horrible limitations - for example, the only way it can access
element X of an array is to use a recursive function that calls
itself X-1 times, nabs the element X, then unwinds back up the
recursive loop. The only way it can find the length of an array is
to use recursion. The only way it can count is to use recursion. I
think I'm going nutso, everywhere I look I see inward spinning
spirals...
cheers(cheers(cheers(cheers(cheers(cheers(cheers(cheers
--- PPoint 1.88
* Origin: Silicon Heaven (3:711/934.16)SEEN-BY: 711/808 934 712/610 @PATH: 711/934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.