sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #19654
Re: [Question #233608]: Efficiency for Chess
Question #233608 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/233608
Status: Open => Answered
RaiMan proposed the following answer:
I do not think, that this is (easily ;-) possible with Sikuli with your
approach.
If you only think about the simple challenge, to find out, which field on the board, that before held a figure is empty now, because the figure was moved, needs 32/2 = 16 searches on average.
If you succeed to strip each search down to 0.1 seconds, each check takes 1.6 seconds in average (up to 3 seconds bad case).
So before thinking about using Sikuli in any way for that, you have to strip down the complexity:
- suppose, each move of a figure is regular (means you know, where a figure should be after a move)
- since you know, where a figure started, you know what kind of figure it is. Having a move history, there is no need to "recognize" a figure on a field (hence 1. is no problem)
- since not all figures on the board can move in every situation, only the fields with moveable figures have to be checked (after being moved, the field is empty now)
- since every figure has only a set of possible moves in a game situation, only the reachable target fields have to be checked, after a figure is moved
- supposing, that the figures are somehow moved by hand, Sikuli should do nothing while the board image changes continually. It should instead wait for the next steady situation (say > 1 second) and then start the analyzation.
- the complete job has to be sliced in a sensible number of subprocesses.
taking all this together, it might be possible with Sikuli, if you
succeed to strip the complexity down, to just understand the meaning of
a field, that is now empty, when it was not empty, when we checked the
last time.
I am not an expert, but I know, that other features of OpenCV (than
those used by Sikuli) might be more suitable to analyze, whats going on
in a video stream.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.