Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #124419 > unrolled thread
| Started by | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| First post | 2026-07-29 14:10 +0200 |
| Last post | 2026-08-04 13:49 +0800 |
| Articles | 20 on this page of 79 — 21 participants |
Back to article view | Back to comp.lang.c++
Tic Tac Toe Quest Bonita Montero <Bonita.Montero@gmail.com> - 2026-07-29 14:10 +0200
Re: Tic Tac Toe Quest Chris Ahlstrom <OFeem1987@teleworm.us> - 2026-07-29 08:14 -0400
Re: Tic Tac Toe Quest Bonita Montero <Bonita.Montero@gmail.com> - 2026-07-29 14:28 +0200
Re: Tic Tac Toe Quest Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-07-29 20:30 +0800
Re: Tic Tac Toe Quest Bonita Montero <Bonita.Montero@gmail.com> - 2026-07-29 14:38 +0200
Turbo Vision (was: Re: Tic Tac Toe Quest) Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-07-29 20:46 +0800
Re: Turbo Vision Bonita Montero <Bonita.Montero@gmail.com> - 2026-07-29 14:57 +0200
Re: Turbo Vision Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-07-29 21:14 +0800
Re: Turbo Vision ... MS-DOS 5 Shell? "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2026-07-31 22:42 +0800
Re: Turbo Vision ... MS-DOS 5 Shell? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-05 04:13 +0800
Re: Turbo Vision ... MS-DOS 5 Shell? usenet@dolik.dev (Andriy D) - 2026-08-05 11:38 +0000
Re: Turbo Vision ... MS-DOS 5 Shell? JJ <jj4public@gmail.com> - 2026-08-05 20:46 +0700
Re: Tic Tac Toe Quest R Kym Horsell <kym@sdf.org> - 2026-07-31 06:19 +0000
Re: Tic Tac Toe Quest Bonita Montero <Bonita.Montero@gmail.com> - 2026-07-31 14:20 +0200
Re: Tic Tac Toe Quest R Kym Horsell <kym@sdf.org> - 2026-07-31 22:05 +0000
Re: Tic Tac Toe Quest steve g <Sgonedes1977@gmail.com> - 2026-08-08 01:35 -0400
Re: Tic Tac Toe Quest James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-07-31 11:22 -0400
Re: Tic Tac Toe Quest "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-31 20:00 -0700
Re: Tic Tac Toe Quest R Kym Horsell <kym@sdf.org> - 2026-08-02 01:17 +0000
Re: Tic Tac Toe Quest Mike Terry <news.dead.person.stones@darjeeling.plus.com> - 2026-08-02 03:41 +0100
Re: Tic Tac Toe Quest Mike Terry <news.dead.person.stones@darjeeling.plus.com> - 2026-08-02 04:19 +0100
Re: Tic Tac Toe Quest R Kym Horsell <kym@sdf.org> - 2026-08-02 21:09 +0000
Re: Tic Tac Toe Quest Mike Terry <news.dead.person.stones@darjeeling.plus.com> - 2026-08-03 01:54 +0100
Re: Tic Tac Toe Quest James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-08-03 17:25 -0400
Re: Tic Tac Toe Quest R Kym Horsell <kym@sdf.org> - 2026-08-03 22:00 +0000
Re: Tic Tac Toe Quest James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-08-04 01:05 -0400
Re: Tic Tac Toe Quest ... End game? TikTok? :) "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2026-08-04 13:54 +0800
Re: Tic Tac Toe Quest "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-08-04 11:50 -0700
Re: Tic Tac Toe Quest James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-08-02 12:30 -0400
Re: Tic Tac Toe Quest bart <bc@freeuk.com> - 2026-08-02 11:25 +0100
Re: Tic Tac Toe Quest Chris Ahlstrom <OFeem1987@teleworm.us> - 2026-08-01 07:40 -0400
Re: Tic Tac Toe Quest DFS <nospam@dfs.com> - 2026-07-29 15:04 -0400
Re: Tic Tac Toe Quest Bonita Montero <Bonita.Montero@gmail.com> - 2026-07-29 21:28 +0200
Re: Tic Tac Toe Quest DFS <nospam@dfs.com> - 2026-07-29 16:25 -0400
Re: Tic Tac Toe Quest Bonita Montero <Bonita.Montero@gmail.com> - 2026-07-30 17:09 +0200
Re: Tic Tac Toe Quest Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-07-30 17:53 +0200
Re: Tic Tac Toe Quest Bonita Montero <Bonita.Montero@gmail.com> - 2026-07-30 21:59 +0200
Re: Tic Tac Toe Quest Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-07-30 23:00 +0200
Re: Tic Tac Toe Quest Paul <nospam@needed.invalid> - 2026-07-30 18:56 -0400
Re: Tic Tac Toe Quest Bonita Montero <Bonita.Montero@gmail.com> - 2026-07-31 20:33 +0200
Re: Tic Tac Toe Quest "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-07-31 19:53 -0700
Re: Tic Tac Toe Quest Michael S <already5chosen@yahoo.com> - 2026-07-31 17:53 +0300
Re: Tic Tac Toe Quest Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-07-31 18:17 +0200
Re: Tic Tac Toe Quest Michael S <already5chosen@yahoo.com> - 2026-08-01 21:44 +0300
Re: Tic Tac Toe Quest Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-08-01 21:43 +0200
Re: Tic Tac Toe Quest Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-07-30 14:58 -0700
Re: Tic Tac Toe Quest "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2026-07-31 00:45 +0800
Re: Tic Tac Toe Quest Bonita Montero <Bonita.Montero@gmail.com> - 2026-07-30 22:00 +0200
Re: Tic Tac Toe Quest "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2026-07-31 13:29 +0800
Re: Tic Tac Toe Quest Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-07-31 14:54 +0800
Re: Tic Tac Toe Quest Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-07-31 03:00 -0700
Re: Tic Tac Toe Quest Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-07-31 20:57 +0800
Re: Tic Tac Toe Quest gazelle@shell.xmission.com (Kenny McCormack) - 2026-07-31 14:08 +0000
Re: Tic Tac Toe Quest ... Discrete mathematics? "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2026-07-31 13:30 +0800
Re: Tic Tac Toe Quest Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-07-31 07:31 +0000
Re: Tic Tac Toe Quest Bonita Montero <Bonita.Montero@gmail.com> - 2026-07-31 14:21 +0200
Re: Tic Tac Toe Quest Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-02 03:57 +0000
Re: Tic Tac Toe Quest ... WarGames (1983) Movie CLIP - Tic Tac Toe With Joshua "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2026-07-31 22:24 +0800
Re: Tic Tac Toe Quest "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2026-07-31 22:18 +0800
Re: Tic Tac Toe Quest Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-07-31 04:17 +0800
Re: Tic Tac Toe Quest ... game programming in C? "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2026-07-31 13:27 +0800
Re: Tic Tac Toe Quest ... game programming in C? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-07-31 14:56 +0800
Re: Tic Tac Toe Quest ... game programming in C? "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2026-07-31 19:43 +0800
VAXen (was: Re: Tic Tac Toe Quest ... game programming in C?) Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-07-31 20:56 +0800
Re: VAXen The Natural Philosopher <tnp@invalid.invalid> - 2026-07-31 14:32 +0100
I Bought a $200K VAX on eBay & – Now It Runs My Smart Lights! - YouTube "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2026-07-31 22:20 +0800
Re: I Bought a $200K VAX on eBay & – Now It Runs My Smart Lights! - YouTube Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-07-31 22:53 +0800
Re: I Bought a $200K VAX on eBay & – Now It Runs My Smart Lights! - YouTube The Natural Philosopher <tnp@invalid.invalid> - 2026-07-31 16:00 +0100
Re: Tic Tac Toe Quest ... VAXen? VMS? Pascal? "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2026-07-31 22:14 +0800
Re: Tic Tac Toe Quest ... VAXen? VMS? Pascal? Spreadsheets! Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-05 04:17 +0800
Re: Tic Tac Toe Quest ... VAXen? VMS? Pascal? Spreadsheets! "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2026-08-05 07:43 -0700
Re: Tic Tac Toe Quest... vibe-coding? Wargames (1983) the movie? "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2026-07-31 22:43 +0800
Tic-tac-toe (過三關? 井字棋?) - Wikipedia "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2026-08-02 17:19 +0800
Re: Tic-tac-toe (???? ????) - Wikipedia Your Name <YourName@YourISP.com> - 2026-08-03 10:01 +1200
Wing Commander III: Heart of the Tiger (was: Re: Tic-tac-toe (???? ????) - Wikipedia) Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-03 17:15 +0800
Re: Wing Commander III ... and Mark Hamill? Star Wars? "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2026-08-04 13:09 +0800
Re: Tic-tac-toe ... balance to the Force? "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2026-08-04 13:06 +0800
Death Star bombing run mechanical toy? "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2026-08-04 13:14 +0800
Re: Death Star bombing run mechanical toy? "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2026-08-04 13:49 +0800
Page 1 of 4 [1] 2 3 4 Next page →
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2026-07-29 14:10 +0200 |
| Subject | Tic Tac Toe Quest |
| Message-ID | <114cqjo$rh2p$2@raubtier-asyl.eternal-september.org> |
Write a program that calculates the number of possible ways to win a Tic Tac Toe round and the number of possible undecided rounds. Don't show the code here immediately but after some days. Just show the results. C and C++ are allowed since the solution will be very similar.
[toc] | [next] | [standalone]
| From | Chris Ahlstrom <OFeem1987@teleworm.us> |
|---|---|
| Date | 2026-07-29 08:14 -0400 |
| Message-ID | <114cqrq$rjmv$1@dont-email.me> |
| In reply to | #124419 |
Bonita Montero wrote this screed in ALL-CAPS (fixed):
> Write a program that calculates the number of possible ways to
> win a Tic Tac Toe round and the number of possible undecided
> rounds. Don't show the code here immediately but after some
> days. Just show the results.
> C and C++ are allowed since the solution will be very similar.
"Yes, tic-tac-toe is a strongly solved game that always ends
in a forced draw when both players use optimal strategy."
I.e. You're beating a dead horse.
--
Second Law of Final Exams:
In your toughest final -- for the first time all year -- the most
distractingly attractive student in the class will sit next to you.
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2026-07-29 14:28 +0200 |
| Message-ID | <114crl1$rt8j$1@raubtier-asyl.eternal-september.org> |
| In reply to | #124420 |
Am 29.07.2026 um 14:14 schrieb Chris Ahlstrom: > "Yes, tic-tac-toe is a strongly solved game that always ends > in a forced draw when both players use optimal strategy." > I.e. You're beating a dead horse. Then show me the results, i.e. the number of possible wins and the number of possible undecided games.
[toc] | [prev] | [next] | [standalone]
| From | Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> |
|---|---|
| Date | 2026-07-29 20:30 +0800 |
| Message-ID | <DnmaS.724$UXf1.142@fx03.ams4> |
| In reply to | #124421 |
On 29/07/2026 8:28 PM, Bonita Montero wrote: > Am 29.07.2026 um 14:14 schrieb Chris Ahlstrom: > >> "Yes, tic-tac-toe is a strongly solved game that always ends >> in a forced draw when both players use optimal strategy." > >> I.e. You're beating a dead horse. > > Then show me the results, i.e. the number of possible > wins and the number of possible undecided games. Are you asking us to do your homework for you? Why can't you do your own homework? -- Johann | email: invalid -> com | http://www.myrkraverk.com/blog/ I'm not from the Internet, I just work there. | via Easynews.com
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2026-07-29 14:38 +0200 |
| Message-ID | <114cs8k$s38o$1@raubtier-asyl.eternal-september.org> |
| In reply to | #124422 |
Am 29.07.2026 um 14:30 schrieb Johann 'Myrkraverk' Oskarsson: > Are you asking us to do your homework for you? Why can't you do > your own homework? It's not my homework. I had this idea tomorrow and I solved it. And you're frustrated.
[toc] | [prev] | [next] | [standalone]
| From | Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> |
|---|---|
| Date | 2026-07-29 20:46 +0800 |
| Subject | Turbo Vision (was: Re: Tic Tac Toe Quest) |
| Message-ID | <RCmaS.1018$BWdc.648@fx11.ams4> |
| In reply to | #124423 |
On 29/07/2026 8:38 PM, Bonita Montero wrote: > Am 29.07.2026 um 14:30 schrieb Johann 'Myrkraverk' Oskarsson: > >> Are you asking us to do your homework for you? Why can't you do >> your own homework? > > It's not my homework. I had this idea tomorrow and I solved it. > And you're frustrated. > Yes, I'm frustrated. Thank you for caring. I'm frustrated because I don't know how to update Visual Studio 2022 from the command line, and will have to start the GUI to get rid of some build error. In other news, I'm using Turbo Vision in that project. I really like that GUI. What GUI toolkits do you use, and why is Turbo Vision the best of them? -- Johann | email: invalid -> com | http://www.myrkraverk.com/blog/ I'm not from the Internet, I just work there. | via Easynews.com
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2026-07-29 14:57 +0200 |
| Subject | Re: Turbo Vision |
| Message-ID | <114ctc6$sf59$1@raubtier-asyl.eternal-september.org> |
| In reply to | #124424 |
Am 29.07.2026 um 14:46 schrieb Johann 'Myrkraverk' Oskarsson: > In other news, I'm using Turbo Vision in that project. I really like > that GUI. What GUI toolkits do you use, and why is Turbo Vision the > best of them? I used TV in the 90s for a machine control app under DOS. I liked it also that days but from a today's view it's not good OOP, just as Microsoft Foundation Classes.
[toc] | [prev] | [next] | [standalone]
| From | Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> |
|---|---|
| Date | 2026-07-29 21:14 +0800 |
| Subject | Re: Turbo Vision |
| Message-ID | <h1naS.725$UXf1.597@fx03.ams4> |
| In reply to | #124425 |
On 29/07/2026 8:57 PM, Bonita Montero wrote: > Am 29.07.2026 um 14:46 schrieb Johann 'Myrkraverk' Oskarsson: > >> In other news, I'm using Turbo Vision in that project. I really like >> that GUI. What GUI toolkits do you use, and why is Turbo Vision the >> best of them? > > I used TV in the 90s for a machine control app under DOS. I liked > it also that days but from a today's view it's not good OOP, just > as Microsoft Foundation Classes. These days, I use Magiblot's Turbo Vision. https://github.com/magiblot/tvision > A modern port of Turbo Vision 2.0, the classical framework for text- > based user interfaces. Now cross-platform and with Unicode support. It should work on Linux, Mac OS, OS X, FreeBSD, and Illumos; not to mention Windows 10 where I use it. I'll show screenshots. They'll be posted on Dropbox, so Dan Cross will not look at them. I hope you will. You'll just have to wait for something a little bit more substantial than the single empty window I have now. -- Johann | email: invalid -> com | http://www.myrkraverk.com/blog/ I'm not from the Internet, I just work there. | via Easynews.com
[toc] | [prev] | [next] | [standalone]
| From | "Mr. Man-wai Chang" <toylet.toylet@gmail.com> |
|---|---|
| Date | 2026-07-31 22:42 +0800 |
| Subject | Re: Turbo Vision ... MS-DOS 5 Shell? |
| Message-ID | <114ic98$2q99k$1@toylet.eternal-september.org> |
| In reply to | #124425 |
On 7/29/2026 8:57 PM, Bonita Montero wrote:
>
> I used TV in the 90s for a machine control app under DOS. I liked
> it also that days but from a today's view it's not good OOP, just
> as Microsoft Foundation Classes.
I remember it. But it never took off, right?
You have to mention DOS 5's shell as well,
and maybe Norton Commander?
The same went to Turbo C++ and then Borland
C++.
MS-DOS Shell - BetaWiki
<https://betawiki.net/wiki/MS-DOS_Shell>
Norton Commander - Wikipedia
<https://en.wikipedia.org/wiki/Norton_Commander>
--
@~@ Simplicity is Beauty! Remain silent! Drink, Blink, Stretch!
/ v \ May the Force and farces be with you! Live long and prosper!!
/( _ )\ https://sites.google.com/site/changmw/
^ ^ https://github.com/changmw/changmw
The game is afoot... Meow...
[toc] | [prev] | [next] | [standalone]
| From | Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> |
|---|---|
| Date | 2026-08-05 04:13 +0800 |
| Subject | Re: Turbo Vision ... MS-DOS 5 Shell? |
| Message-ID | <uJrcS.134815$9jNc.3586@fx16.ams4> |
| In reply to | #124502 |
On 31/07/2026 10:42 PM, Mr. Man-wai Chang wrote: > On 7/29/2026 8:57 PM, Bonita Montero wrote: >> >> I used TV in the 90s for a machine control app under DOS. I liked >> it also that days but from a today's view it's not good OOP, just >> as Microsoft Foundation Classes. > > > I remember it. But it never took off, right? > You have to mention DOS 5's shell as well, > and maybe Norton Commander? > > The same went to Turbo C++ and then Borland > C++. > > MS-DOS Shell - BetaWiki > <https://betawiki.net/wiki/MS-DOS_Shell> > > Norton Commander - Wikipedia > <https://en.wikipedia.org/wiki/Norton_Commander> > I remember DOS 5's shell. I didn't use it much, nor Norton Commander. On the other tentacle, I sometimes use Far Manager in modern Windows. It's nice enough, but I've not gotten used to it yet. Can you recommend a better Norton Commander clone? -- Johann | email: invalid -> com | http://www.myrkraverk.com/blog/ I'm not from the Internet, I just work there. | via Easynews.com https://bsky.app/profile/myrkraverk.bsky.social
[toc] | [prev] | [next] | [standalone]
| From | usenet@dolik.dev (Andriy D) |
|---|---|
| Date | 2026-08-05 11:38 +0000 |
| Subject | Re: Turbo Vision ... MS-DOS 5 Shell? |
| Message-ID | <114v7ca$n00$1@hugayda.dolik.dev> |
| In reply to | #124583 |
In comp.os.msdos.programmer Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> wrote: > I remember DOS 5's shell. I didn't use it much, > nor Norton Commander. On the other tentacle, I > sometimes use Far Manager in modern Windows. It's > nice enough, but I've not gotten used to it yet. > > Can you recommend a better Norton Commander clone? You can try Total Commander for more 'windows' look & feel. Midnight Commander is an OSS NC clone close to the original NC worth looking at too, as it works on Linux and UNIX in general. TTY, \aID
[toc] | [prev] | [next] | [standalone]
| From | JJ <jj4public@gmail.com> |
|---|---|
| Date | 2026-08-05 20:46 +0700 |
| Subject | Re: Turbo Vision ... MS-DOS 5 Shell? |
| Message-ID | <1x4kmasuz8toy.fnxrj8nackbu$.dlg@40tude.net> |
| In reply to | #124583 |
On Wed, 5 Aug 2026 04:13:14 +0800, Johann 'Myrkraverk' Oskarsson wrote: > > I remember DOS 5's shell. I didn't use it much, > nor Norton Commander. On the other tentacle, I > sometimes use Far Manager in modern Windows. It's > nice enough, but I've not gotten used to it yet. > > Can you recommend a better Norton Commander clone? Volkov Commander shareware (but includes source code in their site). Probably the best one, assuming that, free and non-free is not an issue. https://en.wikipedia.org/wiki/Volkov_Commander?useskin=vector Dos Navigator open source freeware. The only alternative to NC which is free. But it uses Turbo Vision, so it's not memory efficient. https://en.wikipedia.org/wiki/DOS_Navigator?useskin=vector Other NC alternatives are not included, since they're either not true NC alternative (e.g. DOS Shell), or not a proper _DOS_ file manager (e.g. Midnight Commander, including all cross-platform ones).
[toc] | [prev] | [next] | [standalone]
| From | R Kym Horsell <kym@sdf.org> |
|---|---|
| Date | 2026-07-31 06:19 +0000 |
| Message-ID | <114hep7$203s$1@nnrp.usenet.blueworldhosting.com> |
| In reply to | #124421 |
In comp.lang.c Bonita Montero <Bonita.Montero@gmail.com> wrote: > Am 29.07.2026 um 14:14 schrieb Chris Ahlstrom: > >> "Yes, tic-tac-toe is a strongly solved game that always ends >> in a forced draw when both players use optimal strategy." > >> I.e. You're beating a dead horse. > > Then show me the results, i.e. the number of possible > wins and the number of possible undecided games. The problem seems to be under-specified. Does who plays first make a "different game". In some ways of looking at it only the final positions determine "the game" and if you want to solve it in your head you can rotate and flip all possible end positions down to a relatively small number. With no summetries and counting who start, the order of the squares marked, and the final position as all befining "the game" then there are a couple million possibilities.
[toc] | [prev] | [next] | [standalone]
| From | Bonita Montero <Bonita.Montero@gmail.com> |
|---|---|
| Date | 2026-07-31 14:20 +0200 |
| Message-ID | <114i3ui$2mvma$1@raubtier-asyl.eternal-september.org> |
| In reply to | #124485 |
Am 31.07.2026 um 08:19 schrieb R Kym Horsell: > Does who plays first make a "different game". I count boards with the first player starting first and the second player doing the same by taking two times the outcome; that's the same as if you inverted the board. > In some ways of looking at it only the final positions determine "the game" > and if you want to solve it in your head you can rotate and flip > all possible end positions down to a relatively small number. Show me the code. ;-) > With no summetries and counting who start, the order of the squares > marked, and the final position as all befining "the game" > then there are a couple million possibilities. Absolutely not. There was the same discussion on Quora and the results shown are exactly the half of mine, because I take both players starting first.
[toc] | [prev] | [next] | [standalone]
| From | R Kym Horsell <kym@sdf.org> |
|---|---|
| Date | 2026-07-31 22:05 +0000 |
| Message-ID | <114j66g$256i$1@nnrp.usenet.blueworldhosting.com> |
| In reply to | #124491 |
In comp.lang.c Bonita Montero <Bonita.Montero@gmail.com> wrote:
> Am 31.07.2026 um 08:19 schrieb R Kym Horsell:
>
>> Does who plays first make a "different game".
>
> I count boards with the first player starting first and
> the second player doing the same by taking two times the
> outcome; that's the same as if you inverted the board.
>
>> In some ways of looking at it only the final positions determine "the game"
>> and if you want to solve it in your head you can rotate and flip
>> all possible end positions down to a relatively small number.
>
> Show me the code. ;-)
...
OK. It took a while to get an 8" floppy drive working to find
the code but this is the way we did it in 1979:
Reading it again it's very much in the line of what the kids these
days call a "prompt".
main :- assert(games(0)), assert(draws(0)),
play(Winner,Moves,FinalBoard),
inc_games,
(Winner=draw -> inc_draws),
fail %%% force it to try all possibilities (above) trying to succeed
; games(Games),writeln(Games),
draws(Draws),writeln(Draws)
.
%% x goes first
%% 1222560
%% 362880
play(Winner,G,B) :-
empboard(B), InitEmp=[1,2,3,4,5,6,7,8,9],
%% player(First),
First=x,
game(First,B,G,InitEmp,FinalEmp),
( player(Winner),won(Winner,B)
; Winner=draw, FinalEmp=[]
)
.
game(_,_,[]) --> []. %% return short solutions first
game(Me,B,[M|Ms]) --> select(M),
{ updboard(Me,B,M), opponent(Me,You) },
game(You,B,Ms).
updboard(Who,B,M) :- arg(M,B,Sq), empty(Sq), Sq=Who.
won(Who,B) :- hasrow(Who,B)
; hascol(Who,B)
; hasdiag(Who,B)
.
%% 1 2 3
%% 4 5 6
%% 7 8 9
hasrow(Who,B) :- checksqs([1,2,3],Who,B)
; checksqs([4,5,6],Who,B)
; checksqs([7,8,9],Who,B)
.
hascol(Who,B) :- checksqs([1,4,7],Who,B)
; checksqs([2,5,8],Who,B)
; checksqs([3,6,9],Who,B)
.
hasdiag(Who,B) :- checksqs([1,5,9],Who,B)
; checksqs([3,5,7],Who,B)
.
checksqs([],_,_).
checksqs([I|Is],Who,B) :- arg(I,B,Sq), Sq == Who, checksqs(Is,Who,B).
empboard(B) :- functor(B,board,9).
empty(Sq) :- var(Sq).
player(Who) :- opponent(Who,_).
opponent(x,0).
opponent(0,x).
inc_games :- retract(games(X)),X1 is X+1,assert(games(X1)).
inc_draws :- retract(draws(X)),X1 is X+1,assert(draws(X1)).
[toc] | [prev] | [next] | [standalone]
| From | steve g <Sgonedes1977@gmail.com> |
|---|---|
| Date | 2026-08-08 01:35 -0400 |
| Message-ID | <87h5l5i38g.fsf@gmail.com> |
| In reply to | #124518 |
R Kym Horsell <kym@sdf.org> writes:
> OK. It took a while to get an 8" floppy drive working to find
> the code but this is the way we did it in 1979:
>
> Reading it again it's very much in the line of what the kids these
> days call a "prompt".
>
> main :- assert(games(0)), assert(draws(0)),
> play(Winner,Moves,FinalBoard),
> inc_games,
> (Winner=draw -> inc_draws),
> fail %%% force it to try all possibilities (above) trying to succeed
>
> ; games(Games),writeln(Games),
> draws(Draws),writeln(Draws)
> .
>
> %% x goes first
> %% 1222560
> %% 362880
>
> play(Winner,G,B) :-
> empboard(B), InitEmp=[1,2,3,4,5,6,7,8,9],
> %% player(First),
> First=x,
> game(First,B,G,InitEmp,FinalEmp),
> ( player(Winner),won(Winner,B)
> ; Winner=draw, FinalEmp=[]
> )
> .
>
> game(_,_,[]) --> []. %% return short solutions first
> game(Me,B,[M|Ms]) --> select(M),
> { updboard(Me,B,M), opponent(Me,You) },
> game(You,B,Ms).
>
> updboard(Who,B,M) :- arg(M,B,Sq), empty(Sq), Sq=Who.
>
> won(Who,B) :- hasrow(Who,B)
> ; hascol(Who,B)
> ; hasdiag(Who,B)
> .
>
> %% 1 2 3
> %% 4 5 6
> %% 7 8 9
>
> hasrow(Who,B) :- checksqs([1,2,3],Who,B)
> ; checksqs([4,5,6],Who,B)
> ; checksqs([7,8,9],Who,B)
> .
>
> hascol(Who,B) :- checksqs([1,4,7],Who,B)
> ; checksqs([2,5,8],Who,B)
> ; checksqs([3,6,9],Who,B)
> .
>
> hasdiag(Who,B) :- checksqs([1,5,9],Who,B)
> ; checksqs([3,5,7],Who,B)
> .
>
> checksqs([],_,_).
> checksqs([I|Is],Who,B) :- arg(I,B,Sq), Sq == Who, checksqs(Is,Who,B).
>
> empboard(B) :- functor(B,board,9).
>
> empty(Sq) :- var(Sq).
>
> player(Who) :- opponent(Who,_).
>
> opponent(x,0).
> opponent(0,x).
>
> inc_games :- retract(games(X)),X1 is X+1,assert(games(X1)).
>
> inc_draws :- retract(draws(X)),X1 is X+1,assert(draws(X1)).
some beautiful code. I wish I still had my cassette tapes..
[toc] | [prev] | [next] | [standalone]
| From | James Kuyper <jameskuyper@alumni.caltech.edu> |
|---|---|
| Date | 2026-07-31 11:22 -0400 |
| Message-ID | <114iekl$2rh3k$1@dont-email.me> |
| In reply to | #124485 |
On 2026-07-31 02:19, R Kym Horsell wrote: ...> With no summetries and counting who start, the order of the squares > marked, and the final position as all befining "the game" > then there are a couple million possibilities. There's only 9 different choices for the first mark, 8 for the second, etc. Ignoring the victory conditions, that means at most 9! = 362,880 games, no matter how you distinguish them. If you stop a game as soon as one side wins, it's much smaller, I won't bother figuring out how many.
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> |
|---|---|
| Date | 2026-07-31 20:00 -0700 |
| Message-ID | <114jngm$38tot$1@dont-email.me> |
| In reply to | #124510 |
On 7/31/2026 8:22 AM, James Kuyper wrote: > On 2026-07-31 02:19, R Kym Horsell wrote: > ...> With no summetries and counting who start, the order of the squares >> marked, and the final position as all befining "the game" >> then there are a couple million possibilities. > > There's only 9 different choices for the first mark, 8 for the second, > etc. Ignoring the victory conditions, that means at most 9! = 362,880 > games, no matter how you distinguish them. If you stop a game as soon as > one side wins, it's much smaller, I won't bother figuring out how many. 8 winning positions afaict. For all of the losing positions, not sure. Working on other things right now.
[toc] | [prev] | [next] | [standalone]
| From | R Kym Horsell <kym@sdf.org> |
|---|---|
| Date | 2026-08-02 01:17 +0000 |
| Message-ID | <114m5rl$iil$1@nnrp.usenet.blueworldhosting.com> |
| In reply to | #124510 |
In comp.lang.c James Kuyper <jameskuyper@alumni.caltech.edu> wrote: > On 2026-07-31 02:19, R Kym Horsell wrote: > ...> With no summetries and counting who start, the order of the squares >> marked, and the final position as all befining "the game" >> then there are a couple million possibilities. > > There's only 9 different choices for the first mark, 8 for the second, > etc. Ignoring the victory conditions, that means at most 9! = 362,880 > games, no matter how you distinguish them. If you stop a game as soon as > one side wins, it's much smaller, I won't bother figuring out how many. I think you missed a few. Games can be shorted if there is a winner. That adds more possibilities. There are 2^9 possible ttt boards if the games goes to 9 moves. But the number of possible boards not looking at symmetries is more like 3^9 i.e. 38x more.
[toc] | [prev] | [next] | [standalone]
| From | Mike Terry <news.dead.person.stones@darjeeling.plus.com> |
|---|---|
| Date | 2026-08-02 03:41 +0100 |
| Message-ID | <114maop$4q0u$1@dont-email.me> |
| In reply to | #124530 |
On 02/08/2026 02:17, R Kym Horsell wrote:
> In comp.lang.c James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
>> On 2026-07-31 02:19, R Kym Horsell wrote:
>> ...> With no summetries and counting who start, the order of the squares
>>> marked, and the final position as all befining "the game"
>>> then there are a couple million possibilities.
>>
>> There's only 9 different choices for the first mark, 8 for the second,
>> etc. Ignoring the victory conditions, that means at most 9! = 362,880
>> games, no matter how you distinguish them. If you stop a game as soon as
>> one side wins, it's much smaller, I won't bother figuring out how many.
>
> I think you missed a few.
James' account looks correct to me. 9! is just an upper bound, as he notes.
> Games can be shorted if there is a winner. That adds more possibilities.
If a game ends with a winner in less than 9 moves, that /reduces/ the possibilities (i.e. reduces
from 9!), not "adding more".
Lets represent a game by the sequence of cells (1 to 9) that are taken in succession. If the rules
said all games continue until the grid is full, then there would be exactly 9! games, e.g.
[123456789]
[174698523]
[523416789]
To see the effect of games ending in fewer moves, imagine the rules declared the first person a
winner if he takes cell 1, ending the game. Then we could allow players to continue playing, while
understanding that the game was won at move 1, just for fun! to see what might have happened in the
remaining 8 moves.
So of the 3 "extended games" having the full 9 moves I listed above, the first two were both won on
move 1. In fact all extended games starting [1...] are just one "real" game as counted by our
program, so instead of counting 9! extended games we would count only 9!-8! real games.
>
> There are 2^9 possible ttt boards if the games goes to 9 moves.
> But the number of possible boards not looking at symmetries
> is more like 3^9 i.e. 38x more.
>
No, you're overcounting! Your 3^9 boards include the one where every cell has an x, but there is no
legal game that results in that - players have to alternate in their play.
Mike.
[toc] | [prev] | [next] | [standalone]
Page 1 of 4 [1] 2 3 4 Next page →
Back to top | Article view | comp.lang.c++
csiph-web