5 ms·
Micro-Max, a 133-line Chess Source
- mocy 5y agoSurprisingly good chess engine (ELO ~2000). Good resource for my kids, the younger learning chess and the older interested in programing.
- mocy 5y agoon iOS, Chess Mini is build around Micro-Max: https://apps.apple.com/us/app/chess-mini/id616424231 https://apps.apple.com/us/app/chess-mini/id616424231
- tasty_freeze 5y agoDespite the engine being 2000 chars and 133 lines, the GUI is expensive. From the program description: Size 40.5 MB
- deleted 5y ago[deleted]
- tromp 5y agoAn interesting long running (2009-2021) discussion between H.G. Muller, author of Micro-Nax, and Oscar Toledo Gutiérrez, author of competing minimal chess program (and IOCCC winner [1]) nanochess, may be found on the chess programming forum [2]. [1] https://en.wikipedia.org/wiki/International_Obfuscated_C_Code_Contest#Toledo_Nanochess https://en.wikipedia.org/wiki/International_Obfuscated_C_Cod... [2] http://talkchess.com/forum3/viewtopic.php?f=7&t=26622 http://talkchess.com/forum3/viewtopic.php?f=7&t=26622
- spicybright 5y agoI didn't think this was much, just some kind of chess rules engine, but this program also implements an AI opponent to play against. That's insanely impressive!
- actually_a_dog 5y agoNot just “an” AI opponent, either, but a fairly sophisticated one. https://www.chessprogramming.org/Alpha-Beta https://www.chessprogramming.org/Alpha-Beta https://www.chessprogramming.org/Quiescence_Search https://www.chessprogramming.org/Quiescence_Search
- jfoucher 5y agoThis is nice, I just compiled it, but how do I play it? I can't seem to find any instructions on the website...
- jkingsman 5y agoFrom https://home.hccnet.nl/h.g.muller/download.html https://home.hccnet.nl/h.g.muller/download.html: > To play you must enter moves in algebraic notation, and to make the computer do a move you should press an extra enter. You can alternate sides whenever you want, the program accepts or plays moves for the side whose turn it is to move. After having done a move, be it yours or his own, micro-Max prints a board with the new position. To quit type control-c.
- deleted 5y ago[deleted]
- racingmars 5y agoThe instructions say you must enter "algebraic notation," but I couldn't figure it out until I took a peek at the source code to see how it was trying to parse input. You always just enter source square to destination square. So to play an opening move 1. d4, you would type `d2d4` (move piece on d2 to d4) and press enter. Then if you want micromax to play the next move for black, just press enter again. It'll think for quite a while and draw the board with the new position. To play 2. Bf4, you'd then type 'c1f4', and so on. (This appears to be "long algebraic notation" and is apparently common in chess engines, now that I look it up on Wikipedia.)
- jfoucher 5y agoRight, that's the answer. I tried using regular algebraic notation without success, but this works fine. Thank you.
- actually_a_dog 5y agoIf you find this interesting, the Chess Programming Wiki has a real treasure trove of info on computer chess. https://www.chessprogramming.org/Main_Page https://www.chessprogramming.org/Main_Page
- TheOtherHobbes 5y agoA reminder that in 1982 you could buy "1K ZX Chess" for the Sinclair ZX81. It ran in 672 bytes of Z80 machine code, including graphics. (Unfortunately a few features had to be left out. But still.)
- classichasclass 5y ago6502 MicroChess says hi. http://www.benlo.com/microchess/index.html http://www.benlo.com/microchess/index.html
- femto113 5y ago> Except for under-promotions ... since the program is unlikely to ever find itself in a situation where it would be useful to play one. Not my proudest moment but I did cheese out a tie in an otherwise lost game in jr. high by moving into what would be a stalemate if opp naively queened his pawn. It was extra ugly because he moved, picked up his previously captured queen from the side of the board, put it down, but didn't take his hand off of the queen before realizing the mistake (literally any other piece would have given him a clear win). Had to get a ruling on whether he was committed, judge decided it was too late because he'd taken his hand off the pawn (I have no idea what the official rule is in this scenario). I still regret not just resigning, but 12 year old me could be a jerk sometimes.
- cmeacham98 5y agoThe judge is right for the wrong reason: https://chess.stackexchange.com/questions/32495/is-there-a-touch-promote-rule https://chess.stackexchange.com/questions/32495/is-there-a-t... The promotion is committed as soon as the new piece touches the promotion square.
- Aditya_Garg 5y agoDon’t feel too bad. Learning how to watch for stalemate tricks when you’re winning is a very important chess lesson. Look up Eric Rosen stalemate traps on YouTube. This is an IM who regularly tricks GMs into stalemate. The GMs are not mad at him, only themselves for falling for it.
- Bootvis 5y agoSwindling is part of the game at all levels. Personally, I feel good about it even at 35 as long as I followed the rules. I remember a kid changing the colour of his bishop by 'misplacing' it on a different colour square to get the same colour in a bishop-pawn endgame. That was not OK.
- selcuka 5y agoThere's also The Kilobyte's Gambit [1], which is a chess engine written in 1024 bytes of JavaScript. [1] https://vole.wtf/kilobytes-gambit/ https://vole.wtf/kilobytes-gambit/
- xwdv 5y agoWhy bother implementing rules at all? Just create an interface to move pieces around on a board wherever you want. If you play chess you should know the rules and how to move pieces.
- greyman 5y agoI kind of agree, chess without promotions, castling and en passant is not chess. But the guy also made full version, with impressively small size: For real purists: a close-to-minimal version that does understand full FIDE rules including under-promotion can be found here. It measures 1433 characters. (although I don't know why people who adhere to chess rules are called "purists", but whatever. :-))
- xwdv 5y agoIn Ultima Online we would play chess to pass time on long sea voyages while hunting for monsters or treasure. There was no rules engine, it was just a simple board where you could drag and drop pieces around on any which way, which allowed for a lot of flexibility in how you played. We could even play random chess this way.
- thom 5y agoDon't know if the author frequents these parts, but I really enjoyed the annotated Toledo chess source book, and would very happily pay for similar here!