Re: tictactoe script - commented - may have pedagogical value

2017-09-13 Thread Ben Bacarisse
Ian Kelly writes: > On Thu, Sep 7, 2017 at 2:05 AM, Chris Angelico wrote: >> On Thu, Sep 7, 2017 at 5:11 PM, Steven D'Aprano >>> I don't know why it places *two* pairs of crosses and naughts instead of >>> one. Maybe the page is broken. >> >> I think it is, as part of being on the Internet Archi

Re: tictactoe script - commented - may have pedagogical value

2017-09-08 Thread Gregory Ewing
Steven D'Aprano wrote: But anyway... it doesn't seem to me that the page is doing any computation using HTML. It's more like a book listing a table of primes. It's a "Choose Your Own Game Of Tic-Tac-Toe" book! -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: tictactoe script - commented - may have pedagogical value

2017-09-07 Thread Grant Edwards
On 2017-09-07, Ian Kelly wrote: > On Thu, Sep 7, 2017 at 2:05 AM, Chris Angelico wrote: >> On Thu, Sep 7, 2017 at 5:11 PM, Steven D'Aprano >>> I don't know why it places *two* pairs of crosses and naughts instead of >>> one. Maybe the page is broken. >> >> I think it is, as part of being on the I

Re: tictactoe script - commented - may have pedagogical value

2017-09-07 Thread Ian Kelly
On Thu, Sep 7, 2017 at 6:21 AM, Chris Angelico wrote: > On Thu, Sep 7, 2017 at 10:07 PM, Steve D'Aprano > wrote: >> As a practical technique, naturally using a lookup table of pre-computed >> values >> is a good solution to many problems. But you cannot say you are performing >> general computat

Re: tictactoe script - commented - may have pedagogical value

2017-09-07 Thread Ian Kelly
On Thu, Sep 7, 2017 at 2:05 AM, Chris Angelico wrote: > On Thu, Sep 7, 2017 at 5:11 PM, Steven D'Aprano >> I don't know why it places *two* pairs of crosses and naughts instead of >> one. Maybe the page is broken. > > I think it is, as part of being on the Internet Archive. To get a > working vers

Re: tictactoe script - commented - may have pedagogical value

2017-09-07 Thread Chris Angelico
On Thu, Sep 7, 2017 at 10:07 PM, Steve D'Aprano wrote: > On Thu, 7 Sep 2017 06:05 pm, Chris Angelico wrote: > >> On Thu, Sep 7, 2017 at 5:11 PM, Steven D'Aprano >> wrote: >>> Thank you for the explanation Stefan, but I do know how to use a browser. >>> >>> What I didn't know is how the HTML works

Re: tictactoe script - commented - may have pedagogical value

2017-09-07 Thread Steve D'Aprano
On Thu, 7 Sep 2017 06:05 pm, Chris Angelico wrote: > On Thu, Sep 7, 2017 at 5:11 PM, Steven D'Aprano > wrote: >> Thank you for the explanation Stefan, but I do know how to use a browser. >> >> What I didn't know is how the HTML works. I thought it was actually doing >> some computation, but it se

Re: tictactoe script - commented - may have pedagogical value

2017-09-07 Thread Chris Angelico
On Thu, Sep 7, 2017 at 5:11 PM, Steven D'Aprano wrote: > Thank you for the explanation Stefan, but I do know how to use a browser. > > What I didn't know is how the HTML works. I thought it was actually doing > some computation, but it seems like its just jumping to pre-rendered tic- > tac-toe gri

Re: tictactoe script - commented - may have pedagogical value

2017-09-07 Thread Steven D'Aprano
On Thu, 07 Sep 2017 01:45:01 +, Stefan Ram wrote: > Steve D'Aprano writes: >>web.archive.org/web/20040428174214/http://www.geocities.com/ flo_kreidler/tictactoe.html >>I am intrigued by the (alleged?) HTML version of tic-tac-toe. Can >>somebody explain what it is doing and how it works? > >

Re: tictactoe script - commented - may have pedagogical value

2017-09-06 Thread Chris Angelico
On Thu, Sep 7, 2017 at 11:32 AM, Steve D'Aprano wrote: > On Thu, 7 Sep 2017 03:56 am, Chris Angelico wrote: > >> On Thu, Sep 7, 2017 at 3:53 AM, Rhodri James wrote: >>> On 06/09/17 18:16, Stefan Ram wrote: > [...] Whenever someone yells at me, »HTML is not a programming language!«,

Re: tictactoe script - commented - may have pedagogical value

2017-09-06 Thread Steve D'Aprano
On Thu, 7 Sep 2017 03:56 am, Chris Angelico wrote: > On Thu, Sep 7, 2017 at 3:53 AM, Rhodri James wrote: >> On 06/09/17 18:16, Stefan Ram wrote: [...] >>>Whenever someone yells at me, »HTML is not a programming language!«, >>>I show them the interactive tic-tac-toe by Flo Kreidler, writte

Re: tictactoe script - commented - may have pedagogical value

2017-09-06 Thread Chris Angelico
On Thu, Sep 7, 2017 at 3:53 AM, Rhodri James wrote: > On 06/09/17 18:16, Stefan Ram wrote: >> >> Dennis Lee Bieber writes: >>> >>> Not to mention there are four rotations of the board, along with >>> reflections... One could, internally, keep track of the rotation needed >>> to >>> normal

Re: tictactoe script - commented - may have pedagogical value

2017-09-06 Thread Rhodri James
On 06/09/17 18:16, Stefan Ram wrote: Dennis Lee Bieber writes: Not to mention there are four rotations of the board, along with reflections... One could, internally, keep track of the rotation needed to normalize the first moves (eg: if a corner was the first move, rotate the board as n

Re: tictactoe script - commented - may have pedagogical value

2017-09-06 Thread Ian Kelly
On Tue, Sep 5, 2017 at 6:15 PM, Stefan Ram wrote: > Ian Kelly writes: >>Usually I've seen Tic Tac Toe implemented using the Minimax algorithm >>since the decision tree for Tic Tac Toe is quite shallow. > > This thread made me want to write a tic-tac-toe game. > > I am naïve in this field. I d

Re: tictactoe script - commented - may have pedagogical value

2017-09-05 Thread namenobodywants
good point. this algorithm doesn't take account of the fact that one can make a threat (x's 147) by parrying a threat (o's 357). nevertheless i'm still certain that the components the algorithm is built from are the same components i use myself to play tictactoe, and i'm still certain that my ow

Re: tictactoe script - commented - may have pedagogical value

2017-09-05 Thread Ian Kelly
On Mon, Sep 4, 2017 at 9:26 PM, wrote: > > """ > this program makes an optimal tictactoe move by answering the following > questions > in their given order until it is told where to put its mark: > > 1) can you win the game? > if so then do it > 2) could your opponent win the game if it was

tictactoe script - commented - may have pedagogical value

2017-09-04 Thread namenobodywants
""" this program makes an optimal tictactoe move by answering the following questions in their given order until it is told where to put its mark: 1) can you win the game? if so then do it 2) could your opponent win the game if it was his turn? if so then put your own mark where a mar