Search found 718 matches

by maksimKorzh
Fri Jul 23, 2021 3:47 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Encoding chess rules into chess pieces
Replies: 2
Views: 1222

Re: Encoding chess rules into chess pieces

This appears to assume pieces are point symmetric, except that Pawns obviously aren't, and still use the system. Note that the 'color' bit is redundant; you could use bit 5 of the ascii code (which distinguishes upper and lower case) for that. I didn't know about 5th bit of ascii code) Offsets are ...
by maksimKorzh
Fri Jul 23, 2021 2:37 pm
Forum: Computer Chess Club: General Topics
Topic: Toyfish: chess engine in Python for absolute beginners
Replies: 12
Views: 1840

Re: Toyfish: chess engine in Python for absolute beginners

Here's a minified version of stockfish, significantly stripped down: https://www.youtube.com/watch?v=DyfxRJ4QDHU I've encode piece move offsets into integers representing chess piece on board, so no more need to source chess rules data from "settings.json" file Source code: https://github.com/maksim...
by maksimKorzh
Fri Jul 23, 2021 1:57 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Encoding chess rules into chess pieces
Replies: 2
Views: 1222

Encoding chess rules into chess pieces

Hi guys, so here's what I did: I've encoded ascii character representation, color, piece weight, (one helper flag) and most notably - move offsets into a single integer for every piece: ########################################################### # # PIECE BIT MAP # ##################################...
by maksimKorzh
Fri Jul 23, 2021 1:48 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: 1k zx chess sources question
Replies: 13
Views: 2842

Re: 1k zx chess sources question

Hi guys, I have a few questions on 1k zx chess by David Horne: 1. 1K means 1K of RAM? 2. Were there any limitations on source code size? 3. Is it written in assembly because BASIC interpreter takes some RAM on it's own? 4. Are there any ports of 1k zx chess from assembly to whatever languages? I'm ...
by maksimKorzh
Fri Jul 23, 2021 1:44 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: 1k zx chess sources question
Replies: 13
Views: 2842

Re: 1k zx chess sources question

So say for 1k zx chess both source code and chess data structures (like board array) were fitting only 1k of RAM! You are making improper use of the term 'source code'. The executable read-only part of 1k zx chess that is in RAM was most likely Z80 machine code. That is called 'object code', simila...
by maksimKorzh
Wed Jul 21, 2021 3:48 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: 1k zx chess sources question
Replies: 13
Views: 2842

Re: 1k zx chess sources question

I hope you and HGM doesn't mind that I'm answering this, as I happen to be in this thread now. Mr. Muller I just confused about the following thing: fit program to certain amount of RAM and source code size. So this is my current understanding: 1. In RAM we load things like board array, piece offse...
by maksimKorzh
Wed Jul 21, 2021 3:42 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: 1k zx chess sources question
Replies: 13
Views: 2842

Re: 1k zx chess sources question

Is above correct? No. The ROM contains the 'factory settings' of the computer ('firmware'). So a dedicated chess computer might contain a chess program (as machine code) in ROM, but a general-purpose computer will only contain some kind of operating system in ROM, to access the I/O devices (serial ...
by maksimKorzh
Wed Jul 21, 2021 2:12 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: 1k zx chess sources question
Replies: 13
Views: 2842

Re: 1k zx chess sources question

Things like BASIC interpreters and I/O routines (the equivalent of the BIOS in PCs) were always in ROM in those days. My first chess program was written for an AMICOS 6800-based build-it-yourself computer with 2.125KB RAM, but there was 8KB EPROM with routines to output a character to the video dis...
by maksimKorzh
Wed Jul 21, 2021 12:39 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: 1k zx chess sources question
Replies: 13
Views: 2842

Re: 1k zx chess sources question

Hi guys, I have a few questions on 1k zx chess by David Horne: 1. 1K means 1K of RAM? 2. Were there any limitations on source code size? 3. Is it written in assembly because BASIC interpreter takes some RAM on it's own? 4. Are there any ports of 1k zx chess from assembly to whatever languages? I'm ...
by maksimKorzh
Wed Jul 21, 2021 7:32 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: 1k zx chess sources question
Replies: 13
Views: 2842

1k zx chess sources question

Hi guys, I have a few questions on 1k zx chess by David Horne: 1. 1K means 1K of RAM? 2. Were there any limitations on source code size? 3. Is it written in assembly because BASIC interpreter takes some RAM on it's own? 4. Are there any ports of 1k zx chess from assembly to whatever languages? I'm j...