Simplifying code

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
mvanthoor
Posts: 1784
Joined: Wed Jul 03, 2019 4:42 pm
Location: Netherlands
Full name: Marcel Vanthoor

Re: Simplifying code

Post by mvanthoor »

hgm wrote: Sun Nov 08, 2020 9:50 am Well, be forewarned that writing a GUI is typically about 100 times as much work as writing an engine.
I know. And I'm not even a GUi programmer to be honest; I don't really like writing GUI's.

On the other hand, I like most of the current GUI's even less; each for their own reasons. I still like the old Fritz 11 GUI the best.
I am not sure what exactly you mean by 'high-resolution display'. WinBoard has always supported square sizes up to 129x129 pixels to cater to the higher resolutions, and allowing even larger square sizes would be a trivial modification. XBoard now uses SVG images for the pieces, which can be scaled to arbitrary size without loss of quality.
I just don't like Winboard as a GUI. I've been using Fritz-type GUI's since the 2000's; Winboard feels alien to me. I'm also of the opinion that it is much more complex than I need. As I said earlier... I like the Fritz 11 GUI the most. It's just a no-nonsense chess GUI that happens to be able to do what I need, and nothing more. Same is true for the Shredder GUI (which is basically in the same style). Arena is in the same style as well, but much less intuitive and with a lot of (sometimes conflicting...) settings.

Obviously I will install Winboard to test the CECP-protocol when I test it in my engine, but I doubt that it will become my main GUI.

With regard to high-dpi monitors, you're right: many GUI's use fixed-size controls and bitmapped imagse. They don't take well to being scaled or having font sizes set that are larger than the defaults. They either get blurry, or fall apart completely.
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL
User avatar
mvanthoor
Posts: 1784
Joined: Wed Jul 03, 2019 4:42 pm
Location: Netherlands
Full name: Marcel Vanthoor

Re: Simplifying code

Post by mvanthoor »

Henk wrote: Sun Nov 08, 2020 10:38 am Might be WinBoard/XBoard does not exist in the future like CTF. Same may hold for Arena.
I even remember that I accidentally deleted or moved Winboard on my computer.
There will always be some other chess gui; but you are right with that one. I've been looking for engines in the 1450-1950 CCRL Elo range to test against, but many I try to download are just gone. The website doesn't exist anymore, and most have been gone so long that the WayBack machine doesn't have it on archive. The rating lists holds many engines that have been written, thrown onto github, tested one version or another, and then abandoned. Many have bugs in their output (and some don't even have any info output at all), which would make them completely useless as an analysis engine.

The same is true for many GUI's. There are lots of them, but often they're just abandoned, or development stalls for many years. Same happened to Picochess. Development was essentially halted in 2018. (That is the reason why I intend to lift the DGT E-board communication from it and start rewriting a version in Rust, some day. I intend to try and upgrade the libraries of the current version, so other people could develop this version further, but I probably won't be developing on top of it. I don't want to get into python for my personal projects.)
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL
User avatar
hgm
Posts: 27792
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Simplifying code

Post by hgm »

mvanthoor wrote: Sun Nov 08, 2020 4:56 pmWith regard to high-dpi monitors, you're right: many GUI's use fixed-size controls and bitmapped imagse. They don't take well to being scaled or having font sizes set that are larger than the defaults. They either get blurry, or fall apart completely.
I just wanted to point out that the XBoard GTK build is very nice in this respect. Both fonts and pieces are scalable without loss of image quality. The dialogs and controls these contain just use the default system theme, which can be expected to be set correctly for the resolution you have. WinBoard is not so nice; it needs a separate set of fixed-sized bitmaps for each square size. But it also has font-based piece rendering, and this works well at the larger square sizes. (At smaller square sizes the outlines of most chess fonts get 'leaky', and the flood-fill algorithms fail.)

I don't know Fritz, really. I always thought that WinBoard was ultimately simple, for doing simple things: you just see a chess board and clocks, and can start playing immediately, or set the engine to move through a menu item.
Daniel Anulliero
Posts: 759
Joined: Fri Jan 04, 2013 4:55 pm
Location: Nice

Re: Simplifying code

Post by Daniel Anulliero »

About GUIs ,I think the more important is : feeling good with a GUI
I use Arena since long time , I like Wb too , but use Arena for my tests.
Each programmer use the prefered one , [Moderation] Please no joking at the expense of other members.
Isa download :
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: Simplifying code

Post by Henk »

mvanthoor wrote: Sun Nov 08, 2020 5:02 pm
Henk wrote: Sun Nov 08, 2020 10:38 am Might be WinBoard/XBoard does not exist in the future like CTF. Same may hold for Arena.
I even remember that I accidentally deleted or moved Winboard on my computer.
There will always be some other chess gui; but you are right with that one. I've been looking for engines in the 1450-1950 CCRL Elo range to test against, but many I try to download are just gone. The website doesn't exist anymore, and most have been gone so long that the WayBack machine doesn't have it on archive. The rating lists holds many engines that have been written, thrown onto github, tested one version or another, and then abandoned. Many have bugs in their output (and some don't even have any info output at all), which would make them completely useless as an analysis engine.

The same is true for many GUI's. There are lots of them, but often they're just abandoned, or development stalls for many years. Same happened to Picochess. Development was essentially halted in 2018. (That is the reason why I intend to lift the DGT E-board communication from it and start rewriting a version in Rust, some day. I intend to try and upgrade the libraries of the current version, so other people could develop this version further, but I probably won't be developing on top of it. I don't want to get into python for my personal projects.)
I also have a bad taste and I find standard settings of WinBoard look ugly. That's another reason to rewrite it.
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: Simplifying code

Post by Henk »

Refactoring sometimes far from easy. So that would be an argument to re-start from scratch.
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: Simplifying code

Post by Henk »

Changed interface of Chessboard or chessboardbits or whatever you name it.

Still not ideal. Really tough work and giving an akward implementation. Keep the system dead. It's me or the system.

By the way I don't have test positions which test move generation that only pass small number number of nodes. Otherwise maybe hardware might get overheated again. Another solution would be to use a transposition table in perft.
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: Simplifying code

Post by Henk »

I think positions in database for neural network training killed my harddisk of previous notebook of two years ago. But might be wrong.
Also I had to store millions of weights.