Stratego

jdavidb on 2002-06-13T22:19:24

Last night I got inspired by a favorite old strategy game my family has suddenly started playing again: Stratego. The result (besides being dead tired this morning from staying up so late) is the beginnings of a Stratego game in Perl. Need to hide one player's pieces from the other and separate it into client-server so you choose between a console frontend, a graphical frontend, or (most importantly, and the reason I wrote it): bots. Oh, and write the code where one piece attacks another. At the moment, all pieces win when attacking and lose when defending.

Of course, who has time to work on something like that? I've got other things I'm supposed to be doing, so I may not come back to it for awhile. It's available to anyone who wants it though under the same terms as Perl, so post if you'd like to run with it. (I'd just like to get it to the point where I could write bots. I wonder if I could finagle a research project or even my masters' thesis out of this.) I guess if I give this away I probably have to change the name to avoid trademark problems.


Interested...

chaoticset on 2002-06-14T02:17:17

...but probably not in a position to help much.

Still, I'm very curious. May I take a look at the code?

(Lame name suggestions, while I'm thinking of it: Freeteego, Stratfreego.)

Re:Interested...

jdavidb on 2002-06-14T04:45:21

Cool. Sure, you can see the code, as long as you don't make fun of it. :) I've put it up here. (May move here in the future if I decide to keep it at that website.)

You're literally getting a development snapshot here. There's a nice chunk of repeated code that needs refactoring. Actually there's several. :) Since I'm distributing, though, I took the time to spell out licensing terms (GPL or Artistic license, the usual).

Re:Interested...

jdavidb on 2002-06-14T04:48:13

Oh, for crying out loud! Can't link directly to a .tar.gz file on geoCities. I presume people here know how to edit the URL and get up a level, but just in case.

Re:Interested...

chaoticset on 2002-06-14T06:14:06

Sure, you can see the code, as long as you don't make fun of it. :)

You overestimate my perl-fu, Sir...

Re:Interested...

jdavidb on 2002-06-14T06:32:23

Nah. Been watching you document your learning on this site. Besides, it's not the Perl that's wrong with the program; it's the algorithms in general. This crumminess of this code transcends language barriers!

Re:Interested...

jdavidb on 2002-06-14T06:59:16

Couldn't resist. Today's (ack! yesterday's!) Peanuts appears to be the first appearance of Marcie, from 1972.

Re:Interested...

jdavidb on 2002-06-14T06:56:05

Updated already to version 0.2. Now red can't see blue's pieces, and vice-versa. Also, the board is turned during blue's turn (moves are entered as if blue's perspective were "correct," i.e., red's square 0,0 is the board's square 0,0, but blue's square 0,0 is the board's square 9,9).

Must sleep. Wish I could just play with this for days. Next step (if there is a next step) is splitting into client/server. I'm going to go dream about it, now. :) Actually, the next step may be a code cleanup and better documentation, including breaking code into modules in separate files. Client and server will probably need to share a lot of code (although the protocol won't require it).