Conditional chess moves again


Back to forum

Kym Farnik    (2018-01-15)
Conditional chess moves (again)

I've used a site in the past with conditional moves. VERY handy!
Especially for forced moves or obvious moves.

For those against the idea - you don't have to use the feature :)

It would speed up games for those that want to use it.

I'm a software developer with PHP experience and would be happy to help implement the feature!
(Yes, putting my money where my mouth is so to speak)


Herbert Kruse    (2018-01-15 12:21:57)
Conditional chess moves (again)

i like that idea :)

Garvin Gray    (2018-01-16 00:52:53)
Conditional chess moves (again)

Ahh conditional moves again. Seems like once a year this topic comes up. Rinse and repeat.

For the record, yes I am in favour it. So please do not take my position as being against it.

This discussion has been held before a few times, but the site does change.

Thibault, what is this sites current capability to handle conditional moves? They would only just have to be just one line linear conditionals.

Kym Farnik    (2018-01-16 03:01:46)
Conditional chess moves (again)

@Thibault ... my offer to assist development is real.
1. Design a prototype UI (probably JS tool to do up to maybe 3 lines of conditionals)
2. Feedback from members
3. Review design
4. Implement and deploy to test site
5. TEST !!
6. Rinse repeat 4/5 until happy
7. Deploy beta
8. Feedback and tune as needed
9. Go live

Thibault de Vassal    (2018-01-16 16:43:40)
Conditional chess moves (again)

Hi all,

Before everything, let's make it clear: Absolute priority (for years actually, but particularly since the launch of the Android apps) right now is to increase the popularity of the server, that slowly went down for more than 5 years. Now it's going better for the first time since, but I'm still working on and have much to do there.

Well, let's say this would be the right thing to do after all (which is another debate, with questions like what if a player does not want his opponent to use this option that by the way he cannot or does not want to use himself because it goes too fast and/or gains time on clock - case that I saw at another server).

Don't misunderstand me: I already used conditional moves at other servers and I liked it too, but I did not find it essential. Also, we all know that all opinions are in nature. And as a reminder, one goal of this server was to offer the simpliest & lightest (HTML or HTML & few javascript) interface.

Kim, one question to think about the work to do in your step 1:

How do you imagine the communication between a Javascript interface & php server? Well, I know how to implement Ajax (which I chose not to use at FICGS), this is not the point here. But it is not enough that moves are verified by javascript - that is a big work if you do it from zero - , it must be validated by the server itself, then confirmed or not to the player, meaning casually one more step. Means more php jobs from the server (which is not a big deal) so new codes that would be compatible between that Javascript UI (that must fit to site's design) & FICGS (that is not obvious if you know the small possible differences in terms of PGN format), a new field in database, the way to handle it after few conditional moves & so on.

Once more, it is feasible, of course. But there are obvious difficulties: it is not possible to add such code without being completely in FICGS codes, that are not object-oriented.

Anyway, if the number of active players grows again, I'm quite sure we'll have a good occasion to discuss it (with some more pressure ^^).

Kym Farnik    (2018-01-17 00:34:08)
Conditional chess moves (again)

First thanks for making your position clear.

Yes, JS talking Ajax to a PHP handler.
I have implemented this type of thing in the past.

Even if the main FICGS code is totally procedural, it is not uncommon to build a new feature using an OO module, and in time either run old and new code in parallel. Or... migrate all the code to a new OO framework over time.

The play move and add conditionals interface would need to be made JS and redesigned. The back end would I expect have a game/move/conditional validator function.
There are plenty of JS chess interfaces that could be used as design input.

I recognize this is a major project for a one man team. I'd say 4-6 weeks of full time effort, possibly longer if we have to design a OO framework for the back end. Hence my offer to help as I'm semi-retired and have time.

A good isolated dev and test environment is mandatory. This is not just a simple site hack.

I hope this helps!

Thibault de Vassal    (2018-01-17 02:04:09)
Conditional chess moves (again)

Many thanks for this nice proposal Kym! By the way, I have no doubt that you could do much better than me (and with more time).

Well, as you understood FICGS has become a big complex (& quite old) thing that is not easy to shake. Each time I think about conditional moves, the more problems I identify (chess 960, draw offers, messages & so on)

Let's give us a few weeks to think about it. Not a way to throw it away, but I really need time for now to work on apps popularity.

Kym Farnik    (2018-01-17 02:06:39)
Conditional chess moves (again)

Thanks for the consideration. I understand your priorities.

Garvin Gray    (2018-01-17 03:45:40)
Conditional chess moves (again)

Problems to identify and solutions:

As a starting point for the games:

Conditional moves would be restricted to the classical chess style. We have to start somewhere and this is the tried and tested format and most well known. So there are already sites out there using conditional moves in classical chess.

As for draw offers. If a player wants to offer a draw, the linear conditional move line stops at that move. They have to input their move and the draw offer by ticking the box.

Then the move passes to player B with the draw offer and they have to accept or decline the draw offer and play their move.

And then play resumes as normal with linear conditional moves.

This is how linear conditional moves worked when I ran the WBCCC events.

I am not sure what you mean by messages?

Thibault de Vassal    (2018-01-17 04:41:22)
Conditional chess moves (again)

Yes, of course, way to go... I only mean: to keep coherence may be not easy and it adds some work at the end.

By messages I mean that it can be frustrating to play several moves without seeing any reply.

Kym Farnik    (2018-01-17 04:44:57)
Conditional chess moves (again)

Messages to the opponent.

On a technical note, I would envision a JavaScript too that would allow:
1. The move
2. Conditional Move Line 1 and response Moves ...
Maybe more than one conditional lines

The whole web transaction, Move + Conditionals + messages are validated client side via the JS.
Then the transaction is re-validated on the server (to stop hacking).
The whole transaction is accepted or not.

Garvin Gray    (2018-01-17 12:57:54)
Conditional chess moves (again)

Kym: Point 2- regarding whether to allow more than one line of conditional moves.

I think it is important to introduce a concept now called project scope. What this means is setting the outer limits of the project and also what are the main aims, or purpose of the project.

Anything that is outside of these aims, is outside of the project scope and is rejected.

As was stated by yourself in the first post:

I've used a site in the past with conditional moves. VERY handy!
Especially for forced moves or obvious moves.

For those against the idea - you don't have to use the feature :)

It would speed up games for those that want to use it.

And then Herbert Kruse said- I like that idea.

So that gives a very good idea of what the project scope is, or the reason for allowing conditional moves- to allow players to make forced moves or obvious moves through conditional moves.

An issue that already occurs in correspondence chess is players either resigning by mistake, move slips, or other mistakes.

Introducing conditional moves will increase the possibility of this occurring. This is why the number of conditional moves must be kept to a minimum, hence why I believe the requirement for linear conditional moves.

This also makes it much easier to deal with draw offers.

Thibault de Vassal    (2018-01-21 17:06:34)
Conditional chess moves (again)

Now I'm to integrate chess.js & chessboard.js in some parts of the site to remove the flash chess board... one issue with conditional moves would be that FICGS rules are slightly different from FIDE rules: no 50/60 moves rule here. Anyway, to be continued.

Kym Farnik    (2018-01-21 23:14:50)
Conditional chess moves (again)

One way to do 50 move rule is to have a small engine on the server the checks the position.

Thibault de Vassal    (2018-01-21 23:55:52)
Conditional chess moves (again)

Sure, it's feasible but the idea was to not implement this rule :) (correspondence chess is quite different from otb chess after all)

Kym Farnik    (2018-01-22 00:12:09)
Conditional chess moves (again)

50 move rule is so rare - it is not a big issue

Garvin Gray    (2018-01-22 01:08:34)
Conditional chess moves (again)

The rules of the site already permit players to claim 6 man tablebase positions, when they appear on the board, as either a win or draw, even if the position is above 50 moves.

That rule is standard across all webserver sites.

Also, even though a position might say mate in 75 and the claim is granted, this does not mean it is outside of the 50 move rule as there maybe a capture or pawn move between the initial position and mate.

Thibault de Vassal    (2018-01-23 00:08:33)
Conditional chess moves (again)

The exact rule is "The 50 moves rule is not implemented, please call referee if an obvious draw is not accepted by your opponent. Please note that a forced checkmate in more than 50 moves won't be considered as a draw."

Consequently, if tablebases say there is a draw, it is not always a draw here, e.g. if this is a draw because of the 50/60 moves FIDE rule.

Thibault de Vassal    (2018-01-25 01:53:48)
Conditional chess moves (again)

As you may have noticed, chess.js & chessboard.js are now integrated as an option in the viewer page...

But strangely, it seems there are some bugs in the PGN processing, or at least this 24.R2e1 in WCH game 98780 (Kruse-Riccio) should be ok with the "sloppy" option.

You can see the new feature here: