Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
matchu
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
20 ms
·
151.
▲
by
matchu
13y ago
The need for the dictionary shows up when your text gets significantly large. Each call to `words.count` is going to re-examine each word of the text to count 'em up, so, if n is the number of words in the text, and m is the number of
152.
▲
by
matchu
13y ago
It looks like it's using the Monte-Carlo bot, "which plays out as many random games as it can within 5 seconds and plays which ever next position had the greatest percentage of wins". So, yup, not hardcoded :)
153.
▲
by
matchu
13y ago
Note that this was created long before the recently posted article. So, its rules variations are totally correct, because it wasn't trying to match the article's definition of the game ;) It originally used what it calls Rule 5a
154.
▲
by
matchu
13y ago
Down to 5.5k two hours after your comment. At this rate, we should be done pretty darn soon.
155.
▲
by
matchu
13y ago
Could it be because of the rules variation? See the comments on rule 5b to negate Perfect Bot's strategy: if forced to an already-won region, the player may choose any region.
156.
▲
by
matchu
13y ago
For Perfect Bot's strategy to work, yeah, but the environment is very open to configuration. Set xIsComputer to false and yIsComputer to "monte" for a fun challenge in which you go first.
157.
▲
by
matchu
13y ago
The KA folks were playing this in the office a few weeks back, James wanted to make a good AI for it, spent a weekend or so on it, and discovered the Perfect Bot in the process. My sole contribution to this program (in addition to moral sup
158.
▲
by
matchu
13y ago
Here's an implementation that pretty much does exactly that. If someone can beat this bot, lemme know: https://www.khanacademy.org/cs/in-tic-tac-toe-ception-perfec... And here's James Irwin's original im
159.
▲
by
matchu
13y ago
I got it working in Linux on Firefox. Chrome didn't work, though.
160.
▲
by
matchu
13y ago
Yeah, it was my placeholder. I was being told that @xzoor didn't have an askKey method, because it looks like he only does on the one level where you're told to ask him for it.
161.
▲
by
matchu
13y ago
Is there an API reference? I don't remember how to ask a guard for a key, and apparently it's not guard.askKey. edit: Ahh, got it. The @key was already given to me (was this specified somewhere?), so the guard didn't support askKey. I wonde
162.
▲
by
matchu
13y ago
That's not at all what I heard in the parent comment. It's not that tinkering with programming languages is bad at all. Rather, what OP proposes is a veritable shitton of work, and really won't be as much fun as he imagines right now; it'll
163.
▲
by
matchu
13y ago
I've literally never had my servers go down on Linode's account, having run 'em for years now. Maybe the management panel goes down from time to time, but that's a totally different number than AWS's 99.999%—is that what you were referring
164.
▲
by
matchu
13y ago
Cross-site request forgery prevention is all about cross-domain browser security policy. A CSRF attack looks something like this: 1. Victim visits Evil.com. 2. Evil.com auto-submits a form to http://www.ExampleBank.com/transfer-money with
165.
▲
by
matchu
13y ago
I think the parent comment is saying that, once I'm done prototyping with Fries, I'm going to move to native technologies, so I'll have to learn two systems total—and, since the parent comment asserts that prototyping in native technologies
166.
▲
by
matchu
13y ago
I did at first, but then it worked on refresh. Go figure.
167.
▲
by
matchu
13y ago
For me, the help popped up for an instant but then instantly vanished. Does it only appear during upload/init? That process can go quickly…
168.
▲
by
matchu
13y ago
I read "support reasons" as needing to send the customers their passwords in case they forget it. Resets are better, sure, so it's not a good reason, but at least it's an actual reason.
169.
▲
by
matchu
13y ago
The first time I opened Gmail in Chrome, it asked me if Gmail should handle mailto links. I said yes, so now mailto links work great for me. It's still kinda messy, but at least Chrome and Gmail made it easy for me rather than having me div
170.
▲
by
matchu
14y ago
I still visit the site regularly just to see how many new rep points I've gotten from old answers. What is my life?