Page 3 of 3
Can you beat 1024 bytes of JavaScript?
Posted: Sat Nov 06, 2021 8:10 am
by Grey
@wiak and all who are interested, try playing at your leisure.
The Kilobyte's Gambit.
It is a 1 kilobyte CGA style browser chess program.
Matt Round, the author of a very strange site (VOLEwtf) about all sorts of things (extraordinary) made a chess program.
This is an unusual browser-based art adaptation of Oscar Toledo's Toledo Atomchess chess program.
Matt once came across a CGA sketch by pixel artist Pinot about a hypothetical chess program based on the drama miniseries The Queen's Gambit. The combination of Atomchess with sketches resulted in The Kilobyte's Gambit.
A distinctive feature is its diminutiveness - the whole game takes up a kilobyte of code (and this is not the limit - the version for MS-DOS takes only 392 bytes). The program knows very well what "En passant" is.
I think you will win easily. But... that terrifying, soulful gaze of Beth Harmon...
- The Kilobyte's Gambit.gif (103.95 KiB) Viewed 2225 times
Re: Improving your code development skills
Posted: Thu Nov 11, 2021 6:54 pm
by misko_2083
1kb but a tough little script.
However I don't play so often, haven't played in years.
Had to make sacrifices to win.
Re: Improving your code development skills
Posted: Thu Nov 11, 2021 9:54 pm
by misko_2083
Okay, it's starting to slowly come back to me.
It's no longer a chalenge, stil it's fascinating how basic chess logic fits into 1KB.
I've came up with a conclusion that playing chess doesn't improve development skills, improves only chess skills.
Re: Can you beat 1024 bytes of JavaScript?
Posted: Wed Dec 01, 2021 7:38 am
by Grey
I liked this miniseries. One of the few decent series in recent times.
Firstly, they did not "drag out" the storyline for a long time. Brevity is the sister of talent, the saying tells us.
Secondly, people in the USSR are shown not as monsters, but quite human. There is a moment with a boy and vodka... but there is NO such thing as "klyukva" ("cranberries") - bears, balalaika, gypsies, Kalashnikov assault rifle in the hands of every person in the frame
A good movie
Re: Improving your code development skills
Posted: Wed Dec 01, 2021 8:26 am
by wiak
CGA graphics is a bit too advanced for me, and Javascript underneath makes that code size far too huge in overall reality.
The following is the one I used to use back sometime around 1979 (but was on a Compukit UK101 despite the following page suggesting the author didn't manage to get it working on that. The link below even gives a version of the source code (it is in 6502 assembly language - so lovely... I myself programmed in that and also UK101 BASIC, by early microsoft I think, back then). Warning - it is a totally crap chess program - it will take your king if you let it and doesn't know en passant or how to castle as far as I remember - anyway, you can improve your code development skills by fixing these irrelevant shortcomings:
http://retro.hansotten.nl/6502-sbc/lee- ... icrochess/
Later I programmed a TCP/IP protocol analyser that caught Vsat data (i.e. TCP/IP over small aperture satellite disk link) and 'analysed' the TCP/IP protocol info. That had to be done in real time, but I managed that using X86 assembly language compiled on an old i386 computer, so could probably manage to rewrite this 6502-based program in X86 for your PC. That would become the boot init for your PC and of course be the fastest init around - far faster than anything even compiled from C - but drawback is that your new 'Pup' would only be able to play crap chess, so not very flexible at all sorry.
That's not a joke, by the way - that was one 'issue' with my 'protocol analyser' program. If you ran it, it took over all computer resources so made a dedicated to purpose machine. i.e. process ID number 1 was the only process running, but great for 'real time' use (it wasn't Linux of course - the program was the OS). Yeah, for 'simplicity', I exaggerate more than a bit, but in theory you could start the whole thing off from CPU first machine code instruction fetch line.
wiak
Re: Improving your code development skills
Posted: Wed Dec 01, 2021 9:30 am
by Grey
wiak wrote: Wed Dec 01, 2021 8:26 am
CGA graphics is a bit too advanced for me, and Javascript underneath makes that code size far too huge in overall reality.
The following is the one I used to use back sometime around 1979 (but was on a Compukit UK101 despite the following page suggesting the author didn't manage to get it working on that. The link below even gives a version of the source code (it is in 6502 assembly language - so lovely... I myself programmed in that and also UK101 BASIC, by early microsoft I think, back then). Warning - it is a totally crap chess program - it will take your king if you let it and doesn't know en passant or how to castle as far as I remember - anyway, you can improve your code development skills by fixing these irrelevant shortcomings:
http://retro.hansotten.nl/6502-sbc/lee- ... icrochess/
I took the 6502 Simulator from Daryl. Then I launched it using WIne in Fossapup. Compiled the MicroChess source code.
It is started and debugged. Interesting. But I felt like a "museum exhibit" from a Historical Museum. Or an old coat in the closet smelling of mothballs (naphthalene)
CGA looks just like a "young handsome" in comparison
- 6502 Sim and MicroChess.gif (131.47 KiB) Viewed 2058 times
Re: Improving your code development skills
Posted: Wed Dec 01, 2021 9:57 am
by wiak
yes, microchess is flipping awful, but I suppose, for its day... still flipping awful
The Price of Victory
Posted: Fri Dec 10, 2021 9:19 pm
by Grey
So, Norwegian grandmaster Magnus Carlsen defeated Russian Ian Nepomniachtchi in the match for the World chess crown and defended the title of world champion. Congratulations to Magnus!
There is also a funny and interesting moment in this story. A Russian porn actress from St. Petersburg, nicknamed Mihanika, promised Ian a "royal night of love." But only if he becomes a world chess champion He lost and the night of love probably won't get him
The inscription reads: "Ian, if you win, I will be your queen for the whole night!"
Re: Improving your code development skills
Posted: Fri Dec 10, 2021 10:48 pm
by Clarity
Ha! If he had won, would his objective for winning had been "He won for the 'TITle' or won for the 'Prize'!"
Re: Improving your code development skills
Posted: Sat Dec 11, 2021 7:32 pm
by Grey
Clarity wrote: Fri Dec 10, 2021 10:48 pm
Ha! If he had won, would his objective for winning had been "He won for the 'TITle' or won for the 'Prize'!"
I'm more interested in another question Do porn actresses like chess or prizes more?
Re: Improving your code development skills
Posted: Thu Dec 16, 2021 9:42 am
by wiak
Grey wrote: Sat Dec 11, 2021 7:32 pm
Clarity wrote: Fri Dec 10, 2021 10:48 pm
Ha! If he had won, would his objective for winning had been "He won for the 'TITle' or won for the 'Prize'!"
I'm more interested in another question Do porn actresses like chess or prizes more?
I'm more interested to know if that Russian porn actress is particularly attracted to anyone who plays chess or would table-football do? I am preparing to challenge Magnus.
I was table-football champion for a while at the Scottish university I studied at. The prizes were generally bottles of whisky (actually).
Re: Improving your code development skills
Posted: Thu Dec 16, 2021 10:08 pm
by 6502coder
For big money and hot girls, chess pales in comparison to poker, IMO. That's why chess players switch to poker: Dan Harrington and Howard Lederer, for instance. Daniel Negreanu is a rare counter-example of a top poker player taking up chess.
Re: Improving your code development skills
Posted: Thu Dec 16, 2021 11:25 pm
by wizard
moved to programing topic
wizard
Re: Improving your code development skills
Posted: Fri Dec 17, 2021 12:37 am
by wiak
wizard wrote: Thu Dec 16, 2021 11:25 pm
Writing some shell scripts in fossa64 9.5 I find I could use xdialog, gtkdialog or yad. Are there reasons to use one vs another?
wizard
This is off-topic area, so usual off-topic joke-type nonsense discussed here. I'd advise you to re-post that question to main forum under Programming area or not many may notice it. It is very arguable indeed that any other of the games and so on discussed in this thread really have any effect on your code developing skills, though you never know...
Re: Improving your code development skills
Posted: Sat Nov 25, 2023 10:12 am
by ozsouth
Took 5 goes, but I won one.
- whitewins.jpg (122.45 KiB) Viewed 1656 times
Re: Improving your code development skills
Posted: Sat Nov 25, 2023 4:15 pm
by rockedge
Inspired by @ozsouth 's winning I went to play some chess with an eBoard on the freechess.org servers and I was beaten repeatedly in Blitz Chess.......I mean destroyed.....and going for casual players as opponents did not improve my record.
- Screenshot(63).jpg (32.52 KiB) Viewed 1623 times
So I played the Sjeng engine on easiest....and looked good for a moment...then one move I thought was okay.......and I lost.
No wonder I can not get Grub4Dos
to work on KLV-Spectr-RT
Re: Improving your code development skills
Posted: Sun Nov 26, 2023 1:20 am
by Clarity
NOt since @tazoc made available the Checkers Game on the old forum, have I seen a PET for the new forum distros. Anyone know how to get one (or it) for today's use?
I have always been much more competitive on this board layout. Although average (maybe) at Chess, I do better at Checkers.
@rockedge, I laughed at the grub4dos comparison. That comedy caught me off-guard. Thanks, we need much more comedics in our lives. Again, now that I stopped laughing...THANKS!
Re: Improving your code development skills
Posted: Sun Nov 26, 2023 3:59 am
by ozsouth
@rockedge - 10 tries using sjeng (with move timer 0); I couldn't even manage a stalemate.
Re: Improving your code development skills
Posted: Sun Nov 26, 2023 12:03 pm
by Grey
rockedge wrote: Sat Nov 25, 2023 4:15 pm
...then one move I thought was okay.......and I lost.
We celebrate the City Day here every year in September. Often this holiday coincides with my birthday. On this day, a chess tournament for everyone takes place in the city park of culture and recreation.
So this September I was defeated by one student. He gave me such a gift for my birthday I was in shock for three days - how could any student there... On the fourth day, I found the strength and admitted that the student was just lucky, and I'm still as cool as before
Such events allow me to remain realistic. A dreamer, but a realist.
I suspect that next year will be even worse Schoolchildren come to the tournament
Re: Improving your code development skills
Posted: Sun Nov 26, 2023 6:19 pm
by greengeek
Clarity wrote: Sun Nov 26, 2023 1:20 am
NOt since @tazoc made available the Checkers Game on the old forum, have I seen a PET for the new forum distros. Anyone know how to get one (or it) for today's use?
Are you able to find any link to that version on the old forum? I see some links to Chinese Checkers - is that what you were after?
Re: Improving your code development skills
Posted: Sun Nov 26, 2023 11:52 pm
by ozsouth
@greengeek - I think what we call 'Draughts' is 'Checkers' to a North America person. I had a fltk version of that years ago. Not sure it would run in today's pups. Website https://cardgames.io has many of these type of games (including chess & 'checkers'!). Sorry - a bit off-topic.
Later: I beat hard chess opponent again (in cardgames.io). 2nd time in over 200 tries.
.
- beat_hard_chess_cardgames.io.jpg (21.85 KiB) Viewed 1409 times
Re: Can you beat 1024 bytes of JavaScript?
Posted: Mon Nov 27, 2023 12:06 am
by wiak
Grey wrote: Sat Nov 06, 2021 8:10 am
@wiak and all who are interested, try playing at your leisure.
The Kilobyte's Gambit.
It is a 1 kilobyte CGA style browser chess program.
Matt Round, the author of a very strange site (VOLEwtf) about all sorts of things (extraordinary) made a chess program.
This is an unusual browser-based art adaptation of Oscar Toledo's Toledo Atomchess chess program.
Matt once came across a CGA sketch by pixel artist Pinot about a hypothetical chess program based on the drama miniseries The Queen's Gambit. The combination of Atomchess with sketches resulted in The Kilobyte's Gambit.
A distinctive feature is its diminutiveness - the whole game takes up a kilobyte of code (and this is not the limit - the version for MS-DOS takes only 392 bytes). The program knows very well what "En passant" is.
I think you will win easily. But... that terrifying, soulful gaze of Beth Harmon...
The Kilobyte's Gambit.gif
Ok, it was fun to play. King pawn opening and vole, black, started advancing rookside pawns towards my kingside pretty early. I just developed pieces and headed round the back of his attack via centre push and got his king trapped in the middle facing devastating attack...... I also castled queenside putting my two rooks in the centre whilst continuing to push my central pawns forward. It didn't blunder but destroyed it anyway. Good for easy practice though.
Re: Improving your code development skills
Posted: Mon Dec 02, 2024 6:59 am
by Jasper