Not logged inRybka Chess Community Forum
Up Topic The Rybka Lounge / Computer Chess / Rybka's partner?
- - By detective_mark7 (*) Date 2010-10-17 16:50
Hi guys, its been a while since I posted something here. I just created a program that can switch 2 chess engines. So far I’m using the Rybka and Zappa combination (Rybka plays for 5 moves then Zappa plays for 5 moves), but I’m disappointed on the results. Now I’m just wondering, which chess engine will be best to be Rybka’s partner? Sadly I can only support UCI, so hopefully the chess engine you’ll recommend will support UCI.
Parent - - By Uly (Gold) Date 2010-10-17 19:00 Edited 2010-10-18 13:04
Nice, I have liked to see such a program for a long while, are you thinking about releasing it?

It's a very fun concept, I've actually tried something like that manually (in my Two Headed Monster experiment, long ago), however, it will lead to weaker play than the strongest engine, so if you stick to the legit engines all results will be "disappointing" (because you'll usually reach positions that engine A understands, but engine B doesn't, so A would play better by itself, and wrong moves are played after the switch).

That said, these suggestions come to mind:

Stockfish 1.9
Rybka 3 (And I think that Rybka 3 Dynamic and Rybka 3 Human are also good suggestions)
Naum 3.2
Shredder 12
Hiarcs Paderborn 2007 (or 13.1, but the first suggestion would increase playing style for sure)
Komodo 1.2
Gull 1.0
Spark 0.5

Good luck, could you post some games?
Parent - - By tano-urayoan (****) Date 2010-10-17 20:17

> Stockfish 9.0



Hey Vytron already master time travel !!!
Parent - By Uly (Gold) Date 2010-10-18 13:05
Oh yeah, I can use the edit button to time travel and fix that!

For people in the space folding business, I still recommend Stockfish 9.0 :yell:
Parent - By Indrajit (***) Date 2010-10-17 19:08
Wow great concept! Can you make the number of moves probabilistic? That is, the next move will be played by the engine which has a better score. Of course the problem is, seldom two different engines will give similar score at any given position.
Parent - - By detective_mark7 (*) Date 2010-10-18 13:45
Hi guys, I think I realized why I have been getting disappointed results. Its just like what Vytron (Thanks for the list btw) said, Engine 2 might mess up what Engine 1 is planning. I’ve created a bias for Engine 1 and Engine 2, (Engine 1 plays for 10 moves and Engine 2 plays for 5 moves) but its still better if Engine 1 plays alone.

It would be better if Engine 1 plays a series of moves then after its finished, Engine 2 will replace Engine 1. But the question is when to switch. I guess I have to develop some kind of algorithm based on their score. I have to make it seem that the engines are working together as a team, not two engines that don’t talk to each other.

It’s funny when I tried Rybka and Amyan (weaker chess engine) combination against Zappa. It’s like watching a seesaw battle. One moment Zappa was in the losing end then suddenly Zappa seemed to be victorious but Rybka managed to save the day.
Parent - By Morpheus (****) Date 2010-10-18 13:50 Edited 2010-10-18 13:59
hi.

I always wondering how and when YOU change ENGINE, when Using 2 or more Engines for analysis

> It would be better if Engine 1 plays a series of moves then after its finished, Engine 2 will replace Engine 1. But the question is when to switch. I guess I have to develop some kind of algorithm based on their score. I have to make it seem that the engines are working together as a team, not two engines that don’t talk to each other.


If You have some new idea I would like to see, share it please :smile:

nice day,
Sekos
Parent - By Uly (Gold) Date 2010-10-18 13:56
are you thinking about releasing it? :surprised:

If I was a programmer, that would be the first thing I'd program, so I think it would be cruel if you kept the program for yourself. Still hoping for a release :wink:
Parent - - By detective_mark7 (*) Date 2010-10-19 13:37
I'm still thinking about the "when to switch problem". But as soon as I can come up with a decent algorithm I'll release it for free.
Parent - - By Uly (Gold) Date 2010-10-19 17:31
That's great news :smile:, I suggest that you make it configurable, so that the user can decide when to switch, remember we're not aiming for engine strength, but for style, so even a text file where the user can set options for the program to order a switch (this can be position dependent or score dependent) would be nice.

I really hope you stick around and keep improving the program, the "Master" engine concept is yet to be implemented and this is a good beginning, it's possible that you could really program an engine that manages engines that is stronger than any single engine alone, though it'll require polishing.
Parent - - By Banned for Life (Gold) Date 2010-10-19 19:05
I think the "triple-brain" concept is really interesting, but don't see it as being very similar to changing engines every N moves.
Parent - - By Uly (Gold) Date 2010-10-19 19:47
Switching engines should be more effective than triple-brain, since the switched engine can use 100% of resources, while a triple brain engine has to share resources with the other engine, so with triple brain at least 50% of resources are always wasted.
Parent - - By Banned for Life (Gold) Date 2010-10-19 20:54
Splitting resources is certainly weaker than just running with your strongest engine, but not as weak as the system you are considering. When you switch between engines using all cores, you:

- Are dumping your hash,
- Never know if the other engine would have come up with something better, and
- Are accepting a less than linear speed increase from multiple cores.

The main disadvantage of splitting resources amongst several engines that are always on is that they will waste resources looking at similar things. So it makes sense if you're doing this to use very different engines. For this, I think Rybka and SF would be a very good pairing.
Parent - - By Uly (Gold) Date 2010-10-19 23:49
I think tripple-brain would end selecting Stockfish's moves most of the time, due to its over-optimism in any given position, so you'd end with mostly Stockfish playing at 50% resources, against the switching entity that would have Stockfish playing at 100%, or otherwise Rybka 4 moves.

For Stockfish clearing the hash won't make much of a difference, triple-brain would fail at recognizing when Rybka 4 came up with something better (because it would look at Stockfish's 0.80 score instead of Rybka's jump from 0.20 to 0.60), and I don't understand the third point (everything considered, on a Quad it'd still be 100% resources with .49 efficiency or 50% with 0.70 efficiency, 49 > 35?)
Parent - - By Banned for Life (Gold) Date 2010-10-20 00:01
Engines have different scaling for scores, but this could easily be normalized out by an intelligent GUI script.

The third point calls out that you end up with (on a quad with 70% increase per doubling) either two engines running at 1.4X, or one engine running at 2X. If there were very little overlap between the two, it's possible that the two engines would be better. This is why people like Eros do analysis on multiple single cores (of course this is helped by his need to analyze many unrelated positions).
Parent - - By Uly (Gold) Date 2010-10-20 05:54

> this could easily be normalized out by an intelligent GUI script.


I've just realized you're talking about a potentially optimal implementation for triple-brain, while I was talking about Shredder Classic's implementation. It could indeed be interesting to match that against an optimally switching engine.
Parent - - By Banned for Life (Gold) Date 2010-10-20 06:02
Yes, the concept of Triple Brain is good, and the name is awesome, but the implementation leaves much to be desired. It would be great if people could make up their own rules for picking one engine' line rather than the other's.
Parent - - By NATIONAL12 (Gold) Date 2010-10-20 22:03
i thought the best name so far was Skulltrail.:smile:
Parent - - By Banned for Life (Gold) Date 2010-10-21 03:03
Yes, Skulltrail is an inspired name for the heart of a computer system. On the other extreme, aquarium is a really lame name for a gui (arena is an excellent name).
Parent - - By Uly (Gold) Date 2010-10-21 04:11
What about Colosseum?
Parent - By Banned for Life (Gold) Date 2010-10-21 04:20
Not as good as arena, but much better than aquarium.
Parent - - By Uly (Gold) Date 2010-10-19 19:48
By the way, why don't you change your name to "Archimedes"? You still have a nick change left :smile:

(Unless they've been reduced since the last time I checked...)
Parent - - By Banned for Life (Gold) Date 2010-10-19 20:59
I have no idea how to do this...
Parent - - By Uly (Gold) Date 2010-10-19 23:42
Here:

http://rybkaforum.net/cgi-bin/rybkaforum/user_profile.pl

Info - Email - Avatar - Name

Click on name, there you can change it. If the name option doesn't appear, you've used all your changes :sad:

Alternatively, you can PM Dadi Jonsson and ask for a change:

http://rybkaforum.net/cgi-bin/rybkaforum/user_info.pl?uid=1

As long as you give a good reason, he'd change it, and I think "my current name is Banned for Life" is a good reason! :yell:
Parent - - By Banned for Life (Gold) Date 2010-10-19 23:51
Apparently it's two strikes and you're out...
Parent - By Uly (Gold) Date 2010-10-19 23:55
I got to change mine 4 times due to a software error, I thought all the other members got 3, when in reality the error gave me 2 more...
Parent - By Patricio (***) Date 2010-10-20 17:30
Hi,

Any chance to move toward this idea: http://rybkaforum.net/cgi-bin/rybkaforum/topic_show.pl?pid=55755;hl=interface

Regards,

                Patricio.
Parent - - By detective_mark7 (*) Date 2010-10-21 12:30
Finally finished the program. I included a smart switching algorithm (can be enabled or disabled) that is based from the score. I’ll upload it somewhere and post the link here ASAP.

The “when to switch problem” is solved using a smart switching algorithm. The smart switching algorithm is based on the score of the engine. Somebody said here that each engine has a different scoring scale. So I took the average scores (absolute value) of past moves (the baseline), and took the ratio of the current score to the baseline. That way I can estimate if the move is good enough. Which engine has the higher ratio plays the move. The algorithm seems to be good when you have 2 great chess engines. But when you have an engine that overrates a crappy move the program switches and the crappy move is played.

Is there a better way to do this?
Parent - By Banned for Life (Gold) Date 2010-10-21 14:50
The ratio idea sounds good, but it might be better to calculate this for any engine based on a large number of positions and store in a table. Also include an engine specific table for how large the ratio needs to be to make a switch. Inferior engines would use a higher ratio of course.
Parent - - By Uly (Gold) Date 2010-10-21 15:11
And it would be even better if you gave the users the chance to change it to decide when to switch, a huge part of my interest is in its configuration (to create games and entities of interesting style, not just strong entities).

Just like some engines allow users to create personalities, it would be optimal if you let the users tweak the switching of the engines, so if one just wanted to see how an entity that switched engine every move would play, one would be able to do so.

I just hope this becomes popular :smile:
Parent - By Indrajit (***) Date 2010-10-21 16:31
Yup. I agree with Vytron. You should let the user give some weights to each engine. That way you can have a weighted score to select the engine to play.
Parent - - By detective_mark7 (*) Date 2010-10-25 11:48
Finally finished the program. Added a STAY factor and CounterMoveMode.

Here is a brief description:

ChessCombi is a UCI chess engine that combines two UCI chess engines into 1.
It can be used in a typical GUI program that supports UCI.
The combination of 2 chess engine can increase playing style but not necessarily produce better results.
The input from ChessCombi is directly fed to the input of the 2 engines.
But the output of the 2 engines however, is screened so that switching occurs.
The ChessCombi V1 is only available in Windows.

A copy is available in http://www.mediafire.com/?zl6ye8kl4vjvqxx#1.

Suggestions and feedback are greatly appreciated.
Parent - By Uly (Gold) Date 2010-10-25 16:27
Thank you very much! I'm looking forward to test it when I have some free time.

> But the output of the 2 engines however, is screened so that switching occurs.


Does this mean that both engines are running simultaneously?
Parent - By Morpheus (****) Date 2010-10-25 17:06
Thanx detective_mark7, For YOUR KOMBI  :lol:

I chect it later, what do You think => which UCI is the best for R4?
Zappa? Stockfish?

nice day?
Sekos
Parent - - By Uly (Gold) Date 2010-10-26 04:57
Alright, I tested it and as expected the entity gets a nice playing style.

However, it gets severely out-searched, and it's because it's running both engines at the same time. Have you heard that Ponder On is bad for running chess matches? It's because the system doesn't give fair resources to the engines, so that one engine may get most of the resources and the resources that are left will cause the other engine to play very weak. With ChessCombi it's the same thing, one engine gets few resource, and it's catastrophic when ChessCombi plays this engine's move.

If you stick to a single engine for a single move, and use its input to decide whether you'll continue with the same engine on the next one, or to switch, you'd get a much stronger entity, because of the point above and because even if the system shared resource fairly, 50% of them would be wasted at all times. You could also get a theoretically stronger engine than the strongest one from the pair if you switched to the other engine when the strongest one would choose a worse move.

This is a very promising project, thank you for your efforts :smile:
Parent - By Uly (Gold) Date 2011-10-03 18:08

> However, it gets severely out-searched, and it's because it's running both engines at the same time. Have you heard that Ponder On is bad for running chess matches? It's because the system doesn't give fair resources to the engines, so that one engine may get most of the resources and the resources that are left will cause the other engine to play very weak. With ChessCombi it's the same thing, one engine gets few resource, and it's catastrophic when ChessCombi plays this engine's move.


Oh yeah? If you have 4 cores, why don't you give 2 cores to one engine and 2 cores to the other? That way that's a non issue and ChessCombi would play as intended, THAT would only be a problem for people on 1CPU, but engines with a resource usage setting like Rybka would not have a problem there.

Really, what's up with that past self? :roll:
Parent - By detective_mark7 (*) Date 2010-10-26 08:46 Edited 2010-10-26 15:32
I think I understand what you are saying. Because Chesscombi uses 2 engines to search then the CPU resources is split into 2. A single engine will search deeper compared to Chesscombi because a single engine has the full CPU attention.

I think I have to screen the inputs so that only one engine will search for the best move.

@Sekos: Stockfish is a great partner for Rybka. I prefer Rybka will start the game, to build up the king’s safety then switches to Stockfish for aggressive moves.

Thanks for a quick reply.
- By DGB (**) Date 2011-10-03 17:52
Is chesscombi death???
Damn. That was a great project.
Up Topic The Rybka Lounge / Computer Chess / Rybka's partner?

Powered by mwForum 2.27.4 © 1999-2012 Markus Wichitill