12 Comments
User's avatar
Andrin Wüest's avatar

That’s really a great idea to search for the best square for a given piece in a chess position. I made this sometimes manually moving a piece to another square and look to the new evaluation. Very time consuming. Will be there access on a website to import a FEN and to get this analisis made by SF 16.1?

Expand full comment
Julian's avatar

I'll maybe do something like this in the future, but for now I focus my time on improving the underlying analysis before I spend time to make it into a website.

Expand full comment
testnameignore's avatar

Curious. How did you write the program? Python?

Expand full comment
Julian's avatar

Yes, I use Python and mainly python chess to interact with PGNs and engines.

For this post, I've also written some code to modify the FENs where I worked with bitboards.

Expand full comment
Ham's avatar

Could I have your code about this post please? About how to analyze the new best square?

Expand full comment
Kurt's avatar

Wow! You were so kind offering me the source code to your finding-traps project. This one seems to be of even more practical value. Would it be alright to share it too? Great stuff really!

Expand full comment
Julian's avatar

Sure, you can share it

Expand full comment
Dennis's avatar

It seems you touch upon every piece from pawn to King, but skip the Queen!

Expand full comment
Julian's avatar

This wasn't a conscious decision, it just happened apparently.

I guess that I thought that queens are the most boring piece for this exercise, since they are so versatile that many central squares will be fine for them. Also they are very easily dislodged from a square so the ideal square is probably less stable than for other pieces.

Expand full comment
Ham's avatar

Could I have your code about this post? How to analyze the best square?

Expand full comment
Kyle Morrison's avatar

I was actually just about to start on a project like this. Is the code available anywhere like github? I would love to fork and/or send PRs

Expand full comment
Julian's avatar

Yes, the code is on github, but it's very messy and constantly changing. You can find it here: https://github.com/jk182/chessProjects

Expand full comment