Live data from Hacker News

A minimax chess engine in regular expressions

nicholas.carlini.com

101–103 of 103 posts

Re: A minimax chess engine in regular expressions

#101

Earlier quoted context omitted.

I appreciate the resources and recommendations. I've been interesting in Rocq (formerly Coq) recently, and I've seen dependent types mentioned, so I've been curious to learn more.

On that note, I discovered Dafny[1] recently, as a more accessible way to program with proofs. There's a companion book[2] that seems very accessible and down-to-earth (and, unfortunately, quite expensive). I didn't have the time to play with it yet, but it looks like it does what Ada/SPARK does (and more), but with less verbose syntax and more options for compilation targets. It seems to be actively developed, too.…

I appreciate even more ideas to work with. A more "working" proof language sounds interesting. While I agree that Rocq is decidably not for a "working programmer," I've had a lot of fun working through the book "Software Foundations". Last night, I was able to formally prove the pumping lemma for regular languages, and that was very satisfying and enjoyable. Another reason I'm learning Rocq is due to my (largely uninformed) interest in homotopy type theory.

Re: A minimax chess engine in regular expressions

#102

Earlier quoted context omitted.

I don't think it's an unreasonable criticism, otherwise the challenge is trivial: ``` function printg(arg) { printf(arg); } ```

That, of course, isn't what they did.

They did put it in a while loop though, which, if my programming isn't completely out of date, is capable of calling the function more than once.

Re: A minimax chess engine in regular expressions

#103
post #86
post #83

Earlier quoted context omitted.

Oh no dude, it's worse than that: c4, Qa4, Qxa5, Qc7, Qxc8# lol

Nice find. I tried to get an even shorter mate, but its tendency to give up its pieces got in the way: 1. e4 e5 2. Bc4 Bc5 3. Qh5 Bxf2+ 4. Ke2 Bxg1 5. Qxf7# Can anyone get a mate in 4?

1. e4 e5 2. Nf3 Nf6 3. d3 Ne4 4. dxe4 a5 5. Ne5 b5 6. Qf3 a4 7. Qf7#

Still, impressive for "a pile of regexen".

Post reply on HN