HN user

igpay

628 karma

Hi, I'm Cameron.

https://csun.io

Posts16
Comments39
View on HN

It is not yet but the game is still under active development and bots have been requested. If you’re interested in getting updates on development, the discord (linked on the site) has been gaining some traction. I’ll be posting updates there.

The time control implemented currently is that you start with a base amount of time and get additional time for each move. I believe it’s referred to as Fischer time which makes me think it’s related to chess, but I’m unsure how prevalent it is in chess or go.

The D20 was the first die shape I tried and I ended up just sticking with it. My reasoning was basically the same as yours - 5% intervals look better.

Agreed that 6 sided dice would not detract from the amount of strategy in the game. I think it could be cool to try a physical version of the game where you shuffle premade tiles and place them in the grid - maybe a fun game to teach kids probability :)

I can't edit my original comment but I have updated the game with "Impossible" difficulty mode as implemented by Louis.

Based on a suggestion from a sister comment, I have also added a "Tutor" mode. When hovering over a square in tutor mode, it shows the probability of winning the game given that you a) select that square and b) continue to play optimally for the rest of the game. Both of these options are in the settings menu in the top right of the game.

Finally, I've added a little writeup to the bottom comparing the strengths of the two AI implementations. Enjoy!

https://www.csun.io/2024/06/08/probabilistic-tic-tac-toe.htm...

Hey all, I'm the author of Probabilistic Tic-Tac-Toe. I'm currently working with Louis to integrate this solver into the game itself so that people can play against it. I'm hoping to have it released by EOD and will update this comment when it's ready.

The current code for board generation is as follows:

  var neutralChances = Random.Range(1, MaxNeutralChances + 1);
  square.GoodChances = Random.Range(MinGoodChances, 20 - neutralChances);
  square.BadChances = 20 - (square.GoodChances + neutralChances);
MaxNeutralChances and MinGoodChances are both set to 6 in the release build. Note that one chance is equal to one face of the die, so 5%. Also, this overload of Random.Range() has an inclusive min value but an exclusive max value.

I guess I didn't include ties in that little blurb I wrote up, but the real results of my 10k trials were around 5:1:11.5 (lose:tie:win) for the AI vs random actor.

Would love to see your AI when it's done! Please shoot me an email if you want. My email is in my profile / in the site footer.

Yes, the AI mostly just looks for plays that have high certainty and are connected to other potential winning squares (for either team). Then it weights plays positively or negatively based on whether or not the "bad" chance outweighs "good"

Agreed that 3D is overkill. I'm fastest at prototyping in Unity though and this was only a couple day project, so I'm unlikely to port it to anything else.

Probabilities are mostly randomized during board generation but skewed in a way to make gameplay feel a bit better. There's a cap on the likelihood of the neutral event, and a bias towards the good event rather than a bad one.

I love this website - such a great repository of knowledge that presumably would've been lost to time otherwise. Although I don't remember there being so many ads last time I visited the site.

His wife, Harriet Fell, was one of my Computer Science professors at Northeastern. I really regret that I never took the time to talk to her about Sheldon. It always crossed my mind but never seemed like the right time.

How I See Numbers 4 years ago

Nope, I definitely do not have human calculator abilities. I'd solve your example problem with long multiplication, and would likely be unable to do so without pen and paper. The only difference is that each single digit multiplication or addition would be done with shapes. The shapes and their interactions seem to be more of a memory recall aid for things I already know (small addition and multiplication tables), rather than tools for solving problems I haven't seen before.

How I See Numbers 4 years ago

Negatives are the same shape as their positive counterpart, but the inverse. So where there would normally be a shape for the number, there's instead a void or impression that wants to be filled.

How I See Numbers 4 years ago

No color associations for me. In fact, I mostly "feel" the shapes I describe in the article rather than seeing them constantly. The pictures I ended up drawing are what the shapes would look like if you could drag them out into the real world and shine a light on them, but otherwise they're generally invisible in my head.

How I See Numbers 4 years ago

My visualizations are definitely heavily base-10-centric. I did some experiments with visualizing numbers in other bases while doing this writeup, and I've come to the conclusion that I just convert each digit to its base 10 equivalent and add. My mental representation for 0x6a, for example, takes on the same shape as (6 * 16) + 10 in my head.

How I See Numbers 4 years ago

Some low primes above ten are slightly pointier than I'd expect them to be (not sure where that expectation is coming from...), but that trend doesn't continue for very long - stops way before triple digits. I think it's likely a characteristic I've assigned to those numbers after repeatedly encountering them in a context where I needed to know they were prime, rather than some innate sense I have for detecting which numbers are prime or not.

How I See Numbers 4 years ago

Thank you! I didn't include them because there aren't many, but I can expand a bit here.

Beyond 10, it's mostly classes of numbers that have unique forms, rather than the numbers themselves. So 15, 25, and 35 to some extent are somewhat of a stair pattern made of three squares, and they want to interlock nicely with each other. Things like powers of two also take on these sorts of interlocking forms, so maybe it's just numbers where I've memorized their doubled versions over time.

Low multiples of three from around 18 through 27 take on a sort of blobby trefoil shape and want to be divided into three parts. Higher, obvious multiples of three like 333 or 666 are similarly tri-lobed, but each lobe is a bit spikier in a way. I don't really have any strong associations with operations for these apart from splitting them into three. Again, I wonder if this is a sort of learned association from multiples of three that I encounter a lot.

How I See Numbers 4 years ago

I'm now pretty convinced that this could be classified as some form of synesthesia, though I'd never thought of it that way before. When I'm actually doing math I tend to _feel_ the shapes of the numbers and their interactions, rather than it being a highly visual sensation like some others experience. The visualizations of the shapes only really happen when I slow down and focus.

I'm not an exceptionally quick calculator as far as I'm aware, though I've never tried to measure. I don't have strong associations with numbers greater than ten (though certain classes of numbers like multiples of five tend to have forms in some contexts), so I do arithmetic on larger numbers digit-by-digit, which is inherently kind of slow.

How I See Numbers 4 years ago

While writing this article, I learned that Ed Catmull has aphantasia. It's amazing to me that someone with a Turing award for work on computer graphics can't mentally "see" those graphics when he closes his eyes. It'd be really eye-opening to somehow get his (or anyone else's) mental state into my own brain, just to try it out for a little.

Interesting that we share some conceptual similarities in how we think about numbers, but they're expressed through different pathways (language vs. visual.) I wonder if the people who imagine pen-and-paper stuff when doing mental math just don't have these pathways set up, and instead recall memories of math-adjacent experiences in lieu of another internal representation of numbers.

How I See Numbers 4 years ago

I recognize these, but they're not what come to mind when I think of my early math education (mostly times table worksheets, or seeing a teacher do long division on the whiteboard.) Definitely possible that they influenced my thinking, though.

How I See Numbers 4 years ago

That description is eerily close to how I feel. Seven for me is definitely a very "loosely bound" number, and it wants to separate along the three and the four.

How I See Numbers 4 years ago

Negative numbers are just like the positive ones, but kind of... the opposite. Like the indentation formed if you pressed the positive number into clay or sand or something. It's like they want to be filled or take away from something else rather than adding onto other forms.

RE how I think about imaginary or complex numbers, in short, I don't :)

I've never studied much higher math, and don't have any reason to think that I'd be particularly good at it.

How I See Numbers 4 years ago

Author here: was definitely not trying to frame this as a tutorial or anything like that. I don't think that my "methods" have any particular advantages. It's just how my brain works.

How I See Numbers 4 years ago

Author here - like one of the other commenters said, I don't think there's anything wrong with your approach, or any way of thinking for that matter. I don't think there's anything particularly "right" or advantageous about the way my brain works either. I don't have any reason to believe I'm better at math than the average engineer - definitely not a math prodigy or super genius or something like that.

With that being said, trying to think a different way for the challenge of it is definitely interesting. Reading through some of the other comments here and trying to taste words or replicate other people's minds is a weird, fun exercise :)

I'd definitely agree that this is overkill for most people. In your case, though, I think that you could put the same amount of work into GnuCash and get the same results without writing any code. Plus you'd have a GUI with built in reports and whatnot. Not sure if that matters to you.

In the article, I briefly touch on skipping manual transaction logging and just importing statements from your bank / credit card. And I gloss over this, but it looks like GnuCash offers similar functionality for automatically updating stock prices https://wiki.gnucash.org/wiki/Online_Quotes - not sure if it's a pain to set up or not, but it's probably not as easy as just calling a google sheets function.

Seems like you wouldn't have any reasons to switch over given that you've already got a nice system going, but just wanted to point out that you can use GnuCash in a way that's not quite as... rigid as the way I use it :)

This is exactly what made me switch away from ledger. I thought that a command-line/plaintext only workflow would be great, because that's what I usually prefer. However, a GUI + autocomplete just ended up being way more useable for me in this case.