Talk:Bulls and cows: Difference between revisions
Content added Content deleted
Walterpachl (talk | contribs) (? is a valid symbol character on TSO) |
(RE-added header section on ''malformed numbers''' after someone deleted the whole section. -- ~~~~) |
||
Line 8: | Line 8: | ||
The description says that the digits must be from the set 1 through 9, but [http://en.wikipedia.org/wiki/Bulls_and_cows Wikipedia] - and some of the solutions on this page - allow zeroes. Also, the description should probably specify whether or not repeated digits are allowed. |
The description says that the digits must be from the set 1 through 9, but [http://en.wikipedia.org/wiki/Bulls_and_cows Wikipedia] - and some of the solutions on this page - allow zeroes. Also, the description should probably specify whether or not repeated digits are allowed. |
||
-- [[User:Markjreed|Markjreed]] 00:20, 31 January 2012 (UTC) |
-- [[User:Markjreed|Markjreed]] 00:20, 31 January 2012 (UTC) |
||
==malformed numbers== |
|||
The task didn't elaborate on what a ''malformed'' guess was, but when I programmed a version (cough-cough, 31 years ago), the user was allowed to guess such things as: |
|||
* 12x5 |
|||
* ..73 |
|||
* 4 5 7 9 |
|||
* 7 , , 4 |
|||
* 42?9 |
|||
Very inexperience beginners (and most children, see below) begin learning the logic of the game by guessing: |
|||
* 1111 |
|||
* 2222 |
|||
* 3333 |
|||
* 5 |
|||
* 79 |
|||
until they've found four digits that are in the number, and then narrow it down with their own perculiar logic. |
|||
The (original) program was intentionlly written to allow these forms of guesses and reasoning (logic). |
|||
It was a goal of the program to not to force any sort of logic or restrictive rules upon the guesser. |
|||
If the guesser could think it, it was allowed. |
|||
I added program logic to the REXX (version 1) program, if only to comply to what ''malformed'' could mean. |
|||
:: (I've since rescinded those restrictions.) -- [[User:Gerard Schildberger|Gerard Schildberger]] 14:16, 5 July 2012 (UTC) |
|||
The original program also allowed any number of ''digits'', and also allowed specification of what ''digits'', |
|||
so that it could mimic the game ''Master Mind'', a popular game of that time. This was the default mode. |
|||
A comment on the program's pegigree: quite a few of the supervisors (where I worked at way back then) were |
|||
allowed to have a (CRT) terminal at home (for working after hours of course, of course), and as a result, their kids could get on-line and play, which back |
|||
then, it was quite a treat to play on a computer, and this was before home computers were common. Even at that, |
|||
home computers were NOT cheap. Of course, it was against the company rules to use a company's mainframe computer for such |
|||
non-business thingys, but almost all the mainframe computers much very much idle after-hours and on weekends, of course. |
|||
When asked by my 2nd level supervisor, I glady wrote some games on my own time in EXEC2, a language on the VM/CMS |
|||
system. And who wanted to throw rocks at one's own bosses? -- [[User:Gerard Schildberger|Gerard Schildberger]] 23:35, 4 July 2012 (UTC) |
|||
:Hmm. Thanks for the info on the variants where you introduce a placeholder not-a-number symbol. I guess it cannot match anything and would serve to reduce complexity when someone wants to test what they think they may know about a partial solution? |
|||
:If I were playing with more digits then I guess it would allow me to reduce the problem to something I could work out in my head. --[[User:Paddy3118|Paddy3118]] 03:00, 5 July 2012 (UTC) |
|||
:: Yes, anything not a digit (in this case) doesn't match anything. It's very helpful when your mind is a bit cloudy (like enjoying some down-time after an eighteen hour coding tear), or maybe you're dealing with a "bulls and cows" game variant with more than four digits. Also, kids like to use a NaN guess as they seem to prefer to deal with a smaller subset of logic. Well, ok, ok, so do I at times. I was playing a few games as I always check out the game after I make a change (or an improvement, ha!), and once, I just couldn't find a solution (I had zigged instead of zagged when coding a change), and the "cows" information was wrong. I had to ignore the cows and try only for the bulls. -- [[User:Gerard Schildberger|Gerard Schildberger]] 03:12, 5 July 2012 (UTC) |
|||
::: Does anybody besides me think that was a weird thing to say? -- [[User:Gerard Schildberger|Gerard Schildberger]] 14:16, 5 July 2012 (UTC) |
|||
----- |
|||
Note: the above section was re-added and slightly re-formated as I had to retrieve it with cut and paste from my E-mail reader via Rosetta Code's notification of changes. I left the original timestamps intact. All the original line-ends (newLines) [if any] have been lost. -- [[User:Gerard Schildberger|Gerard Schildberger]] 14:16, 5 July 2012 (UTC) |
|||
==REXX version 2== |
==REXX version 2== |