ChesSkelet: micro chess program - 363 Bytes

The place for codemasters or beginners to talk about programming any language for the Spectrum.
reeagbo
Dizzy
Posts: 61
Joined: Mon Apr 29, 2019 9:11 am

Re: ChesSkelet: micro chess program - 363 Bytes

Post by reeagbo »

Hi all,

I know it's kind of unorthodox, but I need to contact Arkannoyed and he's not responding private messages or tweets. Anybody who know any other way to contact him?

Thank you!
Alex
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2641
Joined: Mon Nov 13, 2017 3:16 pm

Re: ChesSkelet: micro chess program - 363 Bytes

Post by Ast A. Moore »

Life’s complicated. We’ve had plenty of people in the community going off the grid for a while. I don’t have any of his contacts, but it won’t hurt tagging him in a post like so: [mention]arkannoyed[/mention].

Who knows what his forum settings are; maybe he doesn’t receive notifications for private messages but does when he’s mentioned directly.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
User avatar
arkannoyed
Manic Miner
Posts: 436
Joined: Mon Feb 05, 2018 9:56 am
Location: Northamptonshire

Re: ChesSkelet: micro chess program - 363 Bytes

Post by arkannoyed »

Ello?!

Sorry, seems I’ve been very uncommunicative of late. Been busy with new job and don’t get time to do what I love with speccy things any more. I’m at your service Sir! :)
Alone Coder
Manic Miner
Posts: 401
Joined: Fri Jan 03, 2020 10:00 am

Re: ChesSkelet: micro chess program - 363 Bytes

Post by Alone Coder »

Any chance to port this to Spectrum? https://habr.com/ru/post/478240/
https://github.com/leanchess/leanchess/ ... ter/LC.ASM
It searches moves in depth.
reeagbo
Dizzy
Posts: 61
Joined: Mon Apr 29, 2019 9:11 am

Re: ChesSkelet: micro chess program - 363 Bytes

Post by reeagbo »

Hi Alone Coder,

Arriving like 4 months late. Sorry, I´ve been away for a while. Ok, I know about Leanchess, and it did not occur to me the idea of porting it to Spectrum. That would be a super piece of work. Leanchess is made for 8086 and that is really a great advantage vs. Spectrum program. THe guy who did it really took the best of both worlds.It´s 8 bits, which is perfect for microchess, but the instruction set is way bigger than the Z80's. Imagine, there is one instruction to push all registers to the stack. How many instructions takes to do that in Z80? 8 minimum.

Part of the porting may not be so difficult, but I´m sure that some segments need many more instructions than in the 8086. Also,I don´t feel like getting into the guts of this other program. If you know someone who takes this, let me know.

Alex
reeagbo
Dizzy
Posts: 61
Joined: Mon Apr 29, 2019 9:11 am

Re: ChesSkelet: micro chess program - 363 Bytes

Post by reeagbo »

Aonther thing,

I moved my site to

http://chesskelet.epizy.com/

in case someone feels like having a look. No changes or new contents for now.

Alex
User avatar
Lethargeek
Manic Miner
Posts: 742
Joined: Wed Dec 11, 2019 6:47 am

Re: ChesSkelet: micro chess program - 363 Bytes

Post by Lethargeek »

reeagbo wrote: Thu Apr 16, 2020 7:19 pm Imagine, there is one instruction to push all registers to the stack. How many instructions takes to do that in Z80? 8 minimum.
OTOH the Z80 has more 8-bit registers and an instruction to swap 3 pairs with alternatives so it won't probably need to push that much
reeagbo
Dizzy
Posts: 61
Joined: Mon Apr 29, 2019 9:11 am

Re: ChesSkelet: micro chess program - 363 Bytes

Post by reeagbo »

Right! You could have helped me with my program! Anyway, I meant bytes.

With chesskelet it happened to me that I had all regular registers occupied, so I had no chance but pushing some, so the work, and popping then later,so this kind of thing would have saved mute from some headaches.
Supamax
Drutt
Posts: 23
Joined: Mon Oct 03, 2022 3:18 am

Re: ChesSkelet: micro chess program - 363 Bytes

Post by Supamax »

The main links are not reachable anymore:

http://chesskelet.x10host.com/
http://chesskelet.epizy.com/

The last release I have is v0.811.
Is there a newer one?
Is it possible to have a .tap file of it, instead of a .sna? :)
Wall_Axe
Manic Miner
Posts: 500
Joined: Mon Nov 13, 2017 11:13 pm

Re: ChesSkelet: micro chess program - 363 Bytes

Post by Wall_Axe »

So the a.i. only compares one move. Considering you have about 42,000 bytes left you could implement min max algorithm :) to make it really hard - lol

Out of interest how long does it take to load 350 bytes from tape?

I suppose you could put code in the screen memory as most of the screen is unused, therefore not using any more actual ram :) lol
User avatar
ParadigmShifter
Manic Miner
Posts: 667
Joined: Sat Sep 09, 2023 4:55 am

Re: ChesSkelet: micro chess program - 363 Bytes

Post by ParadigmShifter »

Was about 11 seconds or so for me to save a 363 byte block of random data. Most of that was the 2 lead ins and the header. Attribs are 768 bytes so less than half the time for that probably. (0s take longer to load than 1s which is weird since the 1s - being more pointy - must get stuck in the wires more when loading, the 0s being round can just roll down them?).

You don't need to use a lot of memory for minimax many 80s chess computers only had 4 or 8K of RAM. You can backtrack moves instead of storing them and if you know the order moves are generated in you can just use an index for the best move so far.

Negamax uses even less code memory

function negamax(node, depth, color) is
if depth = 0 or node is a terminal node then
return color × the heuristic value of node
value := −∞
for each child of node do
value := max(value, −negamax(child, depth − 1, −color))
return value

I think the idea is to make a chess game using as few bytes as possible in the machine code payload though so you just do the least thing to get it working. Nothing stopping them from using all the available RAM though - probably not needed for the above reasons. So implementing a proper search for decent moves is probably too large for their liking. I think the aim is to outdo the 1K ZX81 chess program for nerdiness ;)

Modern chess engines use megabytes of memory on hash tables of course to make searches quicker.
Wall_Axe
Manic Miner
Posts: 500
Joined: Mon Nov 13, 2017 11:13 pm

Re: ChesSkelet: micro chess program - 363 Bytes

Post by Wall_Axe »

That's cool, the attributes take about three seconds to load so it must load so quickly :)

The 0's might have to push themselves down the wires
User avatar
ParadigmShifter
Manic Miner
Posts: 667
Joined: Sat Sep 09, 2023 4:55 am

Re: ChesSkelet: micro chess program - 363 Bytes

Post by ParadigmShifter »

Surely they make the wire wide enough for a 0 not to get jammed. It's bends and kinks in the wire that makes the 1s get stuck. That's like electronics 101
User avatar
uglifruit
Manic Miner
Posts: 703
Joined: Thu Jan 17, 2019 12:41 pm
Location: Leicester
Contact:

Re: ChesSkelet: micro chess program - 363 Bytes

Post by uglifruit »

ParadigmShifter wrote: Wed Feb 28, 2024 3:04 am That's like electronics 101
A.k.a. Electronics 5.
CLEAR 23855
User avatar
arkannoyed
Manic Miner
Posts: 436
Joined: Mon Feb 05, 2018 9:56 am
Location: Northamptonshire

Re: ChesSkelet: micro chess program - 363 Bytes

Post by arkannoyed »

Wall_Axe wrote: Wed Feb 28, 2024 2:21 am I suppose you could put code in the screen memory as most of the screen is unused, therefore not using any more actual ram :) lol
I did exactly that in an experimental version of c2k19.
I’ll see if I can find it, though I think it’s probably here on an old thread.
It ran from the screen with ATTRs just concealing its location around the boards surroundings.
User avatar
Sokurah
Manic Miner
Posts: 286
Joined: Tue Nov 14, 2017 10:38 am
Contact:

Re: ChesSkelet: micro chess program - 363 Bytes

Post by Sokurah »

ParadigmShifter wrote: Wed Feb 28, 2024 3:04 am Surely they make the wire wide enough for a 0 not to get jammed. It's bends and kinks in the wire that makes the 1s get stuck. That's like electronics 101
:lol:
Website: Tardis Remakes / Mostly remakes of Arcade and ZX Spectrum games.
My games for the Spectrum: Dingo, The Speccies, The Speccies 2, Vallation & Sqij.
Twitter: Sokurah
Wall_Axe
Manic Miner
Posts: 500
Joined: Mon Nov 13, 2017 11:13 pm

Re: ChesSkelet: micro chess program - 363 Bytes

Post by Wall_Axe »

Lol that would be cool to see the code on the screen actually... even if it's just dots.

It would be funny to change the colour of the byte when it is being executed. :)
User avatar
arkannoyed
Manic Miner
Posts: 436
Joined: Mon Feb 05, 2018 9:56 am
Location: Northamptonshire

Re: ChesSkelet: micro chess program - 363 Bytes

Post by arkannoyed »

Unfortunately I’d mapped white on white ATTRs over the code so it couldn’t be seen, that could be removed. It was just a proof of concept really, as the code needed to be refactored a lot to fit where there was space around the board. Lots of jr xx instructions added.
Wall_Axe
Manic Miner
Posts: 500
Joined: Mon Nov 13, 2017 11:13 pm

Re: ChesSkelet: micro chess program - 363 Bytes

Post by Wall_Axe »

Lol didn't think of strategically locating the code around the board :)
Supamax
Drutt
Posts: 23
Joined: Mon Oct 03, 2022 3:18 am

Re: ChesSkelet: micro chess program - 363 Bytes

Post by Supamax »

Which is the last version and where can it be downloaded from?
User avatar
arkannoyed
Manic Miner
Posts: 436
Joined: Mon Feb 05, 2018 9:56 am
Location: Northamptonshire

Re: ChesSkelet: micro chess program - 363 Bytes

Post by arkannoyed »

What C192K? Should be on this site for the 504 byte version.
Supamax
Drutt
Posts: 23
Joined: Mon Oct 03, 2022 3:18 am

Re: ChesSkelet: micro chess program - 363 Bytes

Post by Supamax »

arkannoyed wrote: Thu Feb 29, 2024 7:22 am What C192K? Should be on this site for the 504 byte version.
Could you kindly write the actual webpage address of the program, and a direct download link?
Thanks a lot.
User avatar
arkannoyed
Manic Miner
Posts: 436
Joined: Mon Feb 05, 2018 9:56 am
Location: Northamptonshire

Re: ChesSkelet: micro chess program - 363 Bytes

Post by arkannoyed »

Supamax
Drutt
Posts: 23
Joined: Mon Oct 03, 2022 3:18 am

Re: ChesSkelet: micro chess program - 363 Bytes

Post by Supamax »

arkannoyed wrote: Thu Feb 29, 2024 7:22 pm https://spectrumcomputing.co.uk/entry/3 ... Chess_2019

The .tap and source code are there
Thanks.
No, I was meaning the latest release of ChesSkelet.
I have v0.811 and saw somewhere that the latest release is v1.006, but I cannot find the file anywhere.

EDIT
ok, I found it here:
viewtopic.php?p=134904#p134904
reeagbo
Dizzy
Posts: 61
Joined: Mon Apr 29, 2019 9:11 am

Re: ChesSkelet: micro chess program - 363 Bytes

Post by reeagbo »

I´m so sorry. I thought this thread was dead, so I have not looked into it for some time. I´ll take the time to reply to you all.

Regarding the site, I recently created a domain for my silly stuff, so now you can find Chesskeket under:
http://chesskelet.borialabs.com/

The whole thing is frozen now. Latest status is:
30/10/2022
Tiny version: v1.006, 269 Bytes (25% smaller).
Full version: 352 bytes: castling implementation enhanced.

I´ll get back to this in a separate message.

Alex

Supamax wrote: Tue Feb 27, 2024 3:36 pm The main links are not reachable anymore:

http://chesskelet.x10host.com/
http://chesskelet.epizy.com/

The last release I have is v0.811.
Is there a newer one?
Is it possible to have a .tap file of it, instead of a .sna? :)
Post Reply