Page 2 of 7

Re: New Year's resolution: a chess engine written in BASH sc

Posted: Sat Jan 23, 2010 11:24 am
by hgm
benstoker wrote:
hgm wrote:Well, it can't be that difficult to translate micro-Max 1.6 into a bash script? Only bout 100 lines...
But can you do C pointers in BASH? Too advanced for BASH, non?
Micro-Max des not really use pointers. I think the one place it does (collecting the input line) could just as easily be re-written using indexing.

Re: New Year's resolution: a chess engine written in BASH sc

Posted: Sat Jan 23, 2010 7:14 pm
by Dirt
bob wrote:
benstoker wrote:I would like to see an obviously very basic script that searches 3 or 4 ply, with simple piece value eval. A minimax and no alpha-beta, etc.

Anybody out there who could help?

The world is crying out for a BASH chess engine.
This is not a hard project, but it is a painful one. And it would be slow beyond belief, since bash is a true interpreter and it would continually pass over the script, parsing and executing as it searches. Slow is not strong enough to describe this. :)
Great! Maybe I'd actually be able to beat it.

Re: New Year's resolution: a chess engine written in BASH sc

Posted: Sat Jan 23, 2010 9:17 pm
by Greg Strong
benstoker wrote:It's stoopid, I know. But, it's been done in Javascript. I would like to see an obviously very basic script that searches 3 or 4 ply, with simple piece value eval. A minimax and no alpha-beta, etc.

Anybody out there who could help?

The world is crying out for a BASH chess engine.
BASH? Too easy. What the world needs is an engine written in Logo 8-)

Re: New Year's resolution: a chess engine written in BASH sc

Posted: Sat Jan 23, 2010 10:00 pm
by smcracraft
Perl and Python would be interesting choices... at the end of your
exercise (whatever language), you will know that language better...

and that's a plus.

Then try converting it to other languages to increase breadth.

Re: New Year's resolution: a chess engine written in BASH sc

Posted: Sat Jan 23, 2010 10:37 pm
by Edmund
Greg Strong wrote:
benstoker wrote:It's stoopid, I know. But, it's been done in Javascript. I would like to see an obviously very basic script that searches 3 or 4 ply, with simple piece value eval. A minimax and no alpha-beta, etc.

Anybody out there who could help?

The world is crying out for a BASH chess engine.
BASH? Too easy. What the world needs is an engine written in Logo 8-)
Is there actually a way to interact with this green spot on the screen once the program has started?

Re: New Year's resolution: a chess engine written in BASH sc

Posted: Sun Jan 24, 2010 12:31 am
by Greg Strong
Edmund wrote:
Greg Strong wrote:
benstoker wrote:It's stoopid, I know. But, it's been done in Javascript. I would like to see an obviously very basic script that searches 3 or 4 ply, with simple piece value eval. A minimax and no alpha-beta, etc.

Anybody out there who could help?

The world is crying out for a BASH chess engine.
BASH? Too easy. What the world needs is an engine written in Logo 8-)
Is there actually a way to interact with this green spot on the screen once the program has started?
Haha... you caught me! A chess program in Logo is probably not possible, as I don't recall any way to interact with the turtle (although there might be. I haven't programmed in logo since I was like 10 :D)

Re: New Year's resolution: a chess engine written in BASH sc

Posted: Sun Jan 24, 2010 1:47 am
by MattieShoes
I wrote one in perl. I think nps was in 200 or 300. I eventually abandoned it because with the long capture sequences and whatnot, even a 1 ply search could take an absurd amount of time.

Re: New Year's resolution: a chess engine written in BASH sc

Posted: Sun Jan 24, 2010 6:59 am
by Edmund
Greg Strong wrote:
Edmund wrote:
Greg Strong wrote:
benstoker wrote:It's stoopid, I know. But, it's been done in Javascript. I would like to see an obviously very basic script that searches 3 or 4 ply, with simple piece value eval. A minimax and no alpha-beta, etc.

Anybody out there who could help?

The world is crying out for a BASH chess engine.
BASH? Too easy. What the world needs is an engine written in Logo 8-)
Is there actually a way to interact with this green spot on the screen once the program has started?
Haha... you caught me! A chess program in Logo is probably not possible, as I don't recall any way to interact with the turtle (although there might be. I haven't programmed in logo since I was like 10 :D)
When I wrote that I have just tried a very basic web application, able to let the turtle walk forwards, right, left and so on.

Then I found a more advanced interpreter. FMSLogo has the following features:
FMSLogo includes support for

* "Standard" Logo parsing
* Turtle Graphics
* Exception handling
* TCP/IP networking
* Text in all available system fonts
* 1024 independent turtles
* Bitmapped turtles
* MIDI devices
* Direct I/O for controlling external hardware (must be admin)
* Serial and parallel port communications
* Saving and loading images in BMP format
* Calling into native DLLs
* Creating windows dialog boxes
* Event driven programming (mouse, keyboard, timer)
* Controlling multimedia devices (WAV sound files, CD-ROM control, etc.)
* 3D Perspective drawing (wire-frame and solids)
* Creating animated GIFs
This one could easily be used to program a chess engine. Also the GUI would be pretty fun; with the feature "1024 independent turtles" you could create 32 turtles then in combination with "Bitmapped turtles" put some bmp of chess pieces on them and let them run over a chess board. And finally with "Event driven programming" you could easily interact with the user.

regards,
Edmund

Re: New Year's resolution: a chess engine written in BASH sc

Posted: Sun Jan 24, 2010 6:29 pm
by Greg Strong
Too cool :)

Re: New Year's resolution: a chess engine written in BASH sc

Posted: Mon Jan 25, 2010 8:45 pm
by Dann Corbit
benstoker wrote:It's stoopid, I know. But, it's been done in Javascript. I would like to see an obviously very basic script that searches 3 or 4 ply, with simple piece value eval. A minimax and no alpha-beta, etc.

Anybody out there who could help?

The world is crying out for a BASH chess engine.
They can enjoy playing chess with this engine on a ship constructed entirely from stones and mortar.

I saw on Mythbusters that a balloon can be constructed from lead foil, along with a concrete glider. So a bash chess program is not alone in its oddness.

Yes, you can produce this engine. The burning question is, "Why?"

P.S.
I guess you can use Hillary's defense.