If your code contains a lot of cruft you don't know what to do with, wouldn't it just be better to scrap the engine and start from scratch, doing it differently this time?
If I hadn't rewritten parts of my current code so often during development (as in: it works like this, just leave it like that), I wouldn't have been able to make heads or tails of my engine right now. As soon as I write something that works, the next step *immediately* is to split that code off into its own functions/modules (whatever is most appropriate), and fix naming conventions and that sort of stuff.
Simplifying code
Moderators: hgm, Rebel, chrisw
-
- Posts: 7218
- Joined: Mon May 27, 2013 10:31 am
Re: Simplifying code
Don't know. Starting from scratch is a lot of work and I usually end up making same mistakes for I forget.
By the way for user interface i am still using ASP.NET MVC while they have Blazor now. Don't know what would be advantage of Blazor.
Also thought about using F# instead of C#. But don't think Blazor supports F#. Or maybe write engine in F# and user interface in Blazor.
Hardly anybody using F# so it is bad for integration.
By the way for user interface i am still using ASP.NET MVC while they have Blazor now. Don't know what would be advantage of Blazor.
Also thought about using F# instead of C#. But don't think Blazor supports F#. Or maybe write engine in F# and user interface in Blazor.
Hardly anybody using F# so it is bad for integration.
-
- Posts: 4052
- Joined: Thu May 15, 2008 9:57 pm
- Location: Berlin, Germany
- Full name: Sven Schüle
Re: Simplifying code
Why do you bother with a user interface for your chess engine? There are enough GUIs around so you only need to provide a working UCI or WB protocol support so that you can focus on the chess engine itself ...
Sven Schüle (engine author: Jumbo, KnockOut, Surprise)
-
- Posts: 7218
- Joined: Mon May 27, 2013 10:31 am
Re: Simplifying code
Sometimes I want to display idiotic information next to a visualized position and zero probability an existing user interface supports that.
Quickly going from one table to the next.
Quickly going from one table to the next.
-
- Posts: 1784
- Joined: Wed Jul 03, 2019 4:42 pm
- Location: Netherlands
- Full name: Marcel Vanthoor
Re: Simplifying code
Because some (if not most) GUI's sorely need updating to work on newer high resolution displays.
Personally, after my engine reaches a strength somewhere in the 2500's, I fully intend to start writing a new GUI (probably based on Electron for the front-end so I can use HTML/CSS to style it, and a Rust backend). I'm making this chess engine/GUI writing stuff my personal programming projects so in the end, I have my very own chess engine and GUI to precisely use as I intend. Somewhere far down the line, I also intend to try and create a replacement for Picochess. Great project, but it's written in Python... and I detest that language.
So in the future, I hope to have not only my own chess engine, but also my own GUI, and my own linux-based chess computer to tinker with; hopefully for the rest of my life.
-
- Posts: 27796
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Simplifying code
Well, be forewarned that writing a GUI is typically about 100 times as much work as writing an engine.
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 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.
-
- Posts: 27796
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
-
- Posts: 759
- Joined: Fri Jan 04, 2013 4:55 pm
- Location: Nice
Re: Simplifying code
Of course
And Arena too can display any informations you want , in the log window
Isa download :
-
- Posts: 7218
- Joined: Mon May 27, 2013 10:31 am
Re: Simplifying code
Might be WinBoard/XBoard does not exist in the future like CTF. Same may hold for Arena.Daniel Anulliero wrote: ↑Sun Nov 08, 2020 10:00 amOf course
And Arena too can display any informations you want , in the log window
I even remember that I accidentally deleted or moved Winboard on my computer.
-
- Posts: 7218
- Joined: Mon May 27, 2013 10:31 am
Re: Simplifying code
One advantage of Blazor is that you don't need to program in javascript. Although in my current ASP.NET MVC (core) solution I hardly use javascript.