

Show HN: Playable Ultimate Tic Tac Toe - KennyCason
http://ken-soft.com/tictactoe/

======
spicyj
matchu posted an implementation earlier today (with an AI!) using the Khan
Academy CS environment:

[https://news.ycombinator.com/item?id=5901365](https://news.ycombinator.com/item?id=5901365)

~~~
KennyCason
Nice. I guess I definitely have to build AI now haha

------
sigkill
Fwiw I found this one better and it has a rudimentary AI too.

(not mine)

[http://joeyrobert.org/projects/ultimatetictactoe/](http://joeyrobert.org/projects/ultimatetictactoe/)

~~~
joeyrobert
Thanks for the plug. I too hacked it out in a couple of hours after reading
the article.

~~~
KennyCason
Nice. Good job!:)

------
KennyCason
Inspired by the recent Hacker News post
([https://news.ycombinator.com/item?id=5898506](https://news.ycombinator.com/item?id=5898506))
and my desire to tinker with HTML5 a bit :) I was trying to make a nice "color
pencil" effect, but still have some work to do.

------
Kiro
It's fun to see that whenever a game concept reaches the front page there are
at least 10 different implementations done within hours. Good job.

~~~
KennyCason
Thanks, I woke up around lunch and saw the post and was like, well, I guess I
know what I'm doing today. Honestly I only originally planned on working on my
"color pencil" line drawing. haha

------
Falling3
Nice... it'd be really cool to get an AI to play against as well.

~~~
mbillie1
Doing the AI would be fun... it seems like one of those cases where
Haskell/Clojure could provide a very elegant solution.

~~~
KennyCason
Love me some haskell. been playing with it for the past month as well. Have a
mostly functioning BEP NN on my github. though for a problem like this AI
would be simple :)

~~~
mbillie1
It'd be one of those things that's 40 lines of Java, 15 lines of Ruby, 2 lines
of Haskell... :) if you do it, post it! I'll hack on it tomorrow with my
Haskell guru/mentor (I am not strong in functional languages yet)

~~~
KennyCason
Haha it would be a fun haskell algorithm to write:)

------
rschmitty
Hah, that was the first thing I thought about when I read the article
yesterday. Then I checked out ultimatetictactoe.com and found it was
registered the same day and I got sad :(

~~~
KennyCason
Very sad :/

------
KennyCason
Fixed random mouse offset bug & whenever all tile become playable, they are
all highlighted. With the exception of the start state (As I think it looks
better white)

~~~
KennyCason
Also added fork on github link

------
atjoslin
Now to make a multiplayer version... I would use Firebase and Angular
probably. Unfortunately I don't feel like staying up all night on a project
tonight :-p

~~~
KennyCason
V2.0 coming to a browser near you!

------
DanBC
I'd love to see an HN competition of AIs learning and playing
UltimateTicTacToe.

~~~
KennyCason
I'm inclined to say there are already a few simple AIs that play perfectly, so
it would likel not be that exciting :/

------
ramki
[http://i.imgur.com/QuPvQyF.png](http://i.imgur.com/QuPvQyF.png) this is the
bug i found with this game, how x can win, when I(in blue) scored 4 before x
reaches 3

~~~
redthrowaway
The goal is not to win the most boards, but to complete 3 in a row on the
large board by winning the small boards. If you're aware of that, I'm not sure
what you're claiming the bug is. Could you clarify?

------
gus_massa
I like it. The green highlighting of the active subboard is too subtle and
sometimes I miss it. Another option is to flash the active subboard when the
players try to use another subboard.

~~~
KennyCason
Yeah, I uploaded originally without the highlighting, but I kept getting lost
as well haha

------
dreen
thats pretty cool

edit: oops, stuck
[http://i.imgur.com/nTOJq1F.png](http://i.imgur.com/nTOJq1F.png)

~~~
KennyCason
All software is accepted as is.. Etc etc haha jk thanks! I'll check what
happened!

~~~
millzlane
I just played out this scenario, at this point player O must select any empty
space.

~~~
KennyCason
Thanks. I thought that was supposed to happen. Perhaps it was confusing
because I didn't highlight all the squares:)

~~~
dreen
This can happen in various scenarios, basically giving the player a choice of
any empty space on the scree. I consider that a fair rule.

------
mbillie1
I was messing with this the last few hours... beat me to it :) well done!
What'd you use?

~~~
KennyCason
Cool:) just used JQuery and canvas. I built all the draw functions myself just
to get more familiar with HTML5

------
Sami_Lehtinen
If I would be unemployed, I would create ultimate 3D tic tac toe for hardcore
players.

~~~
KennyCason
Step 1: quit job Step 2: create ultimate 3d tic tac toe

------
gklitt
Nice job Kenny! We should play sometime.

~~~
KennyCason
Sure! let me get the multi-player and AI-Complete version done, or we could
bust out the marker board/paper :)

~~~
christiangenco
Ahh damn, that was going to be what my fork of your project was going to do.

I'll just leave you to it, then :p

~~~
KennyCason
Well, if you want, do the multi-player part, i'm more interested in the AI,
doing a quck min-max AI solution

------
deletes
Too bad the first player always wins.

------
sold
First turn should belong to X not O.

~~~
KennyCason
fortunately that is very easy to fix, done.

------
jrpt
This is cool.

------
ellisonleao
nice work man

~~~
KennyCason
Thanks!

------
af3
don't have time to play, contributing to LLVM...

