Not logged inRybka Chess Community Forum
Up Topic Rybka Support & Discussion / Aquarium / IDeA: Reducing analysis time for suboptimal lines
- - By Dadi Jonsson (Silver) [is] Date 2012-12-15 10:46 Upvotes 1
This is a tutorial for advanced users, since changing the settings described here requires editing an XML flie.

IDeA spends more time on analyzing good lines than bad lines, similar to what human players do when analyzing a game. Additionally, IDeA monitors every position while it is being analyzed and decreases the analysis time if it doesn't look good enough. The worse a move looks the shorter the analysis time will be. The settings which affect how frequently such checks are done and how deviations are handled are stored in an XML file: <AquariumData>\IDeA\time_tuning.xml. Advanced users can edit this file (e.g. with a text editor) and modify or even deactivate this feature.

The standard Aquarium 2012 time_tuning.xml is shown here:

<?xml version="1.0"?>
<tune_options first_interval="3">
  <if delta="20" time_coeff="0.5"/>
  <if delta="10" time_coeff="0.75"/>
  <if delta="5" time_coeff="0.9"/>
  <if delta="-5" time_coeff="1"/>
  <if delta="-10" time_coeff="0.9"/>
  <if delta="-20" time_coeff="0.75"/>
  <if delta="-100" time_coeff="0.5"/>
</tune_options>


These settings are applied to both automatically and manually generated tasks.

IDeA checks the evaluation of the move that is being analyzed at certain intervals. How often it does that is controlled by the first_interval parameter. In this example it is set to "3" which means that IDeA will make its first check after 3 seconds of analysis and reduce the analysis time depending on the other settings in the file. The second check will be done after 6 seconds (2x3), the third one after 12 seconds (2x6) etc.

Each time the check is performed, Aquarium compares the current engine evaluation to the root node score. If the current evaluation deviates from the root score, both time and max.time for the task can be multiplied by some value which is usually less than 1. In the example XML shown above, if the current engine evaluation is worse than the root score by 20% or more, then the analysis time for the task will be multiplied by 0.5 (i.e. divided by 2). If the deviation is between 10% and 19%, then the analysis time will be multiplied by 0.75. etc. Each <if> tag means the following: If the current deviation is greater than or equal to 'delta', then multiply time and max.time by 'time_coeff'. The tags are not cumulative, i.e. only one of them (with the greatest possible 'delta') is selected. If delta < 0, the analysis time is also reduced when the engine evaluation is better than the root score (Note that this will mostly happen in sidelines where it doesn't affect the mainline).

Note that the time can be reduced repeatedly if the deviation remains big enough. As an example, let's say that you have time=120 and max. time = 600:

You can see the mapping from evaluation to percentage scores on the Evaluation tab of the Annotation Editor (Ctrl+A).

1) After 3 seconds the deviation is 12%. The time is reduced to 120*0.75 = 90 seconds and max. time is reduced to 600*0.75 = 450 seconds.

2) After 6 seconds the deviation is 20%. The time is reduced again and this time to 90*0.5 = 45 seconds. Max. time is reduced to 450*0.5 = 275 seconds.

Etc.

If the evaluation of the position returns to "normal" at a later stage, all penalties are reduced or removed (post-517 builds).

You can add or remove <if> tags. The following is an example of time_tuning which always uses the full analysis time as specified in IDeA (and does its first check after 100 minutes):

<?xml version="1.0"?>
<tune_options first_interval="6000">
  <if delta="100" time_coeff="1"/>
</tune_options>


The simplest method of effectively turning off this feature is to set first_interval to a high number in the default time_tuning.xml.
Parent - - By Shaun (****) [gb] Date 2012-12-15 12:00
Hi Dadi,

Ahhh this may explain my problems... but I also have a question that if I understand correctly could impact everyone?

1. When submitting a load of positions for analysis if they are unreleated to the current root move then aquarium will believe that they should be disgarded?

i.e. root move is analysing a position in my sons game say +4, then I decide I want to analyse a load of positions from the Caro-Kann so I sent perhaps the first 6 moves these are all around +0 so the time used is repetitively reduced?

2. What happens if there are many 'root positions'? I will frequently add/delete root positions from a project as positons of interest change, sometimes they will be completely unsound because I want to see what the computer sees when it is not obvious to me.

I have a seperate project for each game and I re-use the project when new moves occur, deleting the old root nodes that I am no longer interested in, so again what root node will be used???
Parent - - By Dadi Jonsson (Silver) [is] Date 2012-12-15 12:11

> 1. When submitting a load of positions for analysis if they are unreleated to the current root move then aquarium will believe that they should be disgarded?


No, they are not disregarded.

> i.e. root move is analysing a position in my sons game say +4, then I decide I want to analyse a load of positions from the Caro-Kann so I sent perhaps the first 6 moves these are all around +0 so the time used is repetitively reduced?


Yes. It makes little sense to use the same project for unrelated positions with a huge difference in evaluations.

> 2. What happens if there are many 'root positions'? I will frequently add/delete root positions from a project as positons of interest change, sometimes they will be completely unsound because I want to see what the computer sees when it is not obvious to me.


Each position that is being analyzed is traced back to its (active) root position. Everyone who uses IDeA adds many root nodes while analyzing a game (e.g. a correspondence game), deactivates them and (usually) has one or a few active root nodes.
Parent - - By Shaun (****) [gb] Date 2012-12-15 13:09
Thanks for your reply.

>No, they are not disregarded.


By disregarded I mean given less significance, sorry the use of the word disregarded is ambiguous.

>Yes. It makes little sense to use the same project for unrelated positions with a huge difference in evaluations.


I was just using an active project to submit positions for analysis - I am sure I am not the only one? i.e. before seeing this I just thought why set up a seperate projects?

I don't see how when submitting a game to IDeA the score relative to the root has meaning?

i.e. I have started using Komodo for IDeA analysis so I want to submit every recent OTB game my son has played, how should I set up the projects? the root node is the opening position? but I am interested in, and need analysed to a decent depth the whole game even if the moves are +/- 5? Is the only option to manually adjust the XML - while I can do the it is hardly 'user friendly'.

>Each position that is being analyzed is traced back to its (active) root position. Everyone who uses IDeA adds many root nodes while analyzing a game (e.g. a correspondence game), deactivates them and (usually) has one or a few active root nodes.


understand but see above submitting games...

Shaun
Parent - - By pawnslinger (****) [us] Date 2012-12-15 17:53
Hi Shaun:

I do not consider myself an "advanced" user - and I would almost never think of changing any XML file.  That said, perhaps my experience can help.

I don't use analysis by "time limit".  Except in very rare situations.  There are always exceptions, I guess.  I use "fixed length" evaluations.  In my project I ask for the time limit to be zero seconds and  the number of plies as needed... again that can vary.  Usually in end-games, a much longer ply depth is called for, so usually I adjust the ply depth as needed during the course of the game.

But I don't do whole game analysis, I play lots of ICCF chess, so I analyze the games in-progress... under ICCF rules this is normal procedure.
Parent - - By Shaun (****) [gb] Date 2012-12-15 20:58
thanks for sharing your experience.

I will have a think about it, in the past I have favored fixed time over fixed depth for analysis.

thanks again
Shaun
Parent - By pawnslinger (****) [us] Date 2012-12-15 22:07 Edited 2012-12-15 22:12
Sometimes I use fixed time limit, but I find (in my games) that when I use fixed time too much time (overall) is spent... especially on moves that are off the critical path.  It is not really the fault of Aquarium, but the fault of most engines.  The way engines work, they tend (if you allow) to over analyze non-optimal (losing) positions.  So I severely limit the overal time that Aquarium can spend on an evaluation, but ask for the depth necessary.  In this way, non-optimal moves that the engine takes too long on, hit the time limit, the other moves usually hit the ply limit.  If this is not happening in any given position, then an adjustment has to be made, to either give more time or lower/raise the ply count.  In any case, I try to tune it, such that most moves hit the desired ply count, and only the rare move hits the time limit (usually those with evals +/- 4.00 or greater in magnitude).  Usually, I try not to put too fine a point on bad moves (why analyze whether it is 4.0 or 4.25??  The position most like is lost, the quarter or half point don't really matter).  But when the eval is less than 2.0, the quarter or half point looms much larger and is worth the extra effort.
Parent - - By Moz (****) Date 2012-12-15 18:54
I think the problem is that you're trying to use IDeA for something that it's not really designed for. Root positions aren't very useful when the goal is to analyze an entire OTB game. After all, you don't really care about the score being propagated back to the root because that tells you nothing about how well your son did or didn't play on any given move.

I think you're using the wrong tool for the job.
Parent - - By Shaun (****) [gb] Date 2012-12-15 20:52
I am not sure I agree?

IDeA is ideal for analysing games? as when you submit a game only new moves are analysed* and the games can be browsed with the tree showing the scores.

I have a single tree view that shows the scores from Rybka / Houdini and Komodo the same individual trees can then be used to extend openings etc?

Shaun

* it really bugs me that in other software when you analyse a game you are frequently re-analysing the same positions
Parent - - By Moz (****) Date 2012-12-15 22:47 Edited 2012-12-15 23:02

>and the games can be browsed with the tree showing the scores.


I think a tree is a great container for storing moves and scores. It's the minimax element that isn't really needed when the goal is analyze a complete OTB game. When analyzing a game you want a tree that's more akin to the IA (or CAP?) tree than an IDeA tree. Here's a position, here are the moves that were played in that position and here is how the engine scored those moves. Each position (aka node) is an island unto its self. 

> I have a single tree view that shows the scores from Rybka / Houdini and Komodo the same individual trees can then be used to extend openings etc?


I have something very similar. There's no doubt that IDeA is the best tool for analyzing openings. It's in a league of its own in that regard.

> it really bugs me that in other software when you analyse a game you are frequently re-analysing the same positions


Me too! It's as if they don't realize you can exclude moves.
Parent - By Shaun (****) [gb] Date 2012-12-16 08:52

>I think a tree is a great container for storing moves and scores. It's the minimax element that isn't really needed when the goal is analyze a complete OTB game. When analyzing a game you want a tree that's more akin to the IA (or CAP?) tree than an IDeA tree. Here's a position, here are the moves that were played in that position and here is how the engine scored those moves. Each position (aka node) is an island unto its self. 


However minimax helps find the truth regarding a position, which is wanted just as much when browsing a game as in opening preparation?
Parent - - By Master Om (Bronze) [in] Date 2012-12-16 02:02
Shaun I agree with Moz. IDeA is a position analysis tool not a game analysis tool. For this work best is Deep Positional Analysis which you can run with multiple engine.
As it simulates Game play rather than IA you will get very original suggestions.
Parent - - By Shaun (****) [gb] Date 2012-12-16 08:59

>Shaun I agree with Moz. IDeA is a position analysis tool not a game analysis tool. For this work best is Deep Positional Analysis which you can run with multiple engine.


As it simulates Game play rather than IA you will get very original suggestions.

A game is just a collection of positions? IDeA allows you to analyse a game or group of games without repeating analysis and minimax helps find the truth?

If I turn off the 'Reducing analysis time for suboptimal lines' it will be fine for my purposes? But perhaps this could be made more intelegent where a position does not have a root node for comparison???

Shaun
Parent - - By Master Om (Bronze) [in] Date 2012-12-16 09:33

>A game is just a collection of positions? IDeA allows you to analyse a game or group of games without repeating analysis and minimax helps find the truth?


The basic difference between IDeA And DPA is DPA is the simulation of game play. If you use houdini contempt comes into play and will give original analysis.
I suggest you go for "Full Analysis" feature in Fritz using your own settings for your sons games. And FYKI , Full analysis starts from last move and not from first like IDeA. And you can see where your son went wrong very easily with the correct suggestions
what should have been played. Also you can use then IDeA on that game setting root nodes where u think the position was crucial.

>If I turn off the 'Reducing analysis time for suboptimal lines' it will be fine for my purposes?


May be. But IDeA is not meant for that. Rather Use IDeA to make repertoire for your son's opening preparation. By the I am good in making repertoires.
Parent - - By Shaun (****) [gb] Date 2012-12-17 09:54
Hi I have used Fritz before and I am using the 'Lets Check feature' to submit games when I want a game analysed quickly - when my son is playing in a tournament this will allow decent depth analysis of his games between rounds! (as as long as you rack up credit you can have hundreds of computers working for you!!!)

However I dont like DPA it annoys me too much that the same position is analysed multiple times and its too much hassle trying to merge the analysis.

I doubt I can be convinced that for me IDeA is not great for game analysis (now I know how to turn OFF 'Reducing analysis time for suboptimal lines'. However I do appreciate your time explaining you thoughts it is always useful to challenge review your own ideas as they can change over time :wink:

I would be VERY interested in Dadi's view on this subject - should IDeA be avoided for game analysis???

Shaun
Parent - By Master Om (Bronze) [in] Date 2012-12-17 13:41
As I said, IDeA is a position analysis tool. So one can use in game analysis. but Its not fitting here. Full Analysis in Fritz is better. Thats the best feature in Fritz.
You can set time and depth. Even In DPA you can exclude move and set branching factor. The Advantage of Full Analysis is it starts backwards.
Parent - - By Shaun (****) [gb] Date 2012-12-17 09:55
Dadi,

I would be very interested in you view on IDeA for game analysis?

See below (oops above).

Thanks

Shaun

P.S. I have already adjusted my 'time_tuning.xml' files thank you so much for explaining these!!!
Parent - - By Dadi Jonsson (Silver) [is] Date 2012-12-17 11:55
I'll give you an answer later this week (which means that there isn't a simple yes/no answer to this question). I'm a little busy now :smile:
Parent - By Shaun (****) [gb] Date 2012-12-17 13:18
Thanks - no hurry - I really appreciate the information/articles you put together!!!
Parent - By Shaun (****) [gb] Date 2012-12-28 14:06
Dadi,

Hope you had a good Christmas!

Have you had a chance to look at this again? No worries if you are busy just did not want it forgotten.

All the best

Shaun

P.S. Have a great New Year!
Parent - By Shaun (****) [gb] Date 2013-01-14 20:44
Hi Dadi,

any chance you can look at this and comment on IDeA for game analysis

thanks

Shaun
Parent - By Shaun (****) [gb] Date 2013-02-24 07:54
Hi Dadi,

sorry to raise this again but I would be very interested in the direction of IDeA s a game analysis tool or if this is being abandoned?

Thanks

Shaun
Parent - By Dadi Jonsson (Silver) [is] Date 2013-02-24 12:22
I'm sorry, but I have been very busy.

I always find it interesting when users come up with novel ways of using Aquarium, especially when at first sight it goes against what I might have recommended. This is one of those cases and I have given it some thought.

If you want to get a good overview and feedback for your son, Game Analysis is an excellent option when you are dealing with one or just a few games. Game Analysis does not spend time on analyzing well-known opening moves. Even when you are at tournaments with your son, you can use remote engines to speed up the analysis. The drawbacks of this method (and similar methods in other software) is that it may still spend time on re-analyzing positions that were analyzed in your son's previous games and, more seriously, you gradually lose the overview you had. The more games your son plays, the more difficult it becomes to keep track of the openings he has played, the mistakes he has made in those openings etc. Nevertheless, I think that Game Analysis is a useful tool at your son's level for a high-level view of the most important points in the game.

This is a problem that all players face, both OTB players and correspondence chess players. If you keep all your son's games in a single database, it's simple enough to create a statistics tree containing all his games (Game List > Tree > Build Tree) and add the game count as a column to your tree configuration. That way you can always see if, and how often, your son has faced the position on the board even if you are viewing a game in a different database. That's already very useful, of course.

If you want to see the evaluation in addition to the game count, obviously you will need to analyze every position. This comes naturally for correspondence players who use IDeA for their analysis. The result of their previous analysis is always accessible, so the next time they encounter the same position in a game they can keep improving their old analysis instead of starting from scratch. If an OTB player wants the same advantages, he has to send his games to IDeA for analysis.

The advantage of using IDeA for OTB games are:

1) The same position is never analyzed twice. This can, for instance, be achieved by keeping a Master Tree with all analyzed positions and specifying that tree as "Filter tree" when sending positions to IDeA.

2) The results of the analysis are visible whenever you view a game, whether it's your own game or a game played by others, regardless of which database it is stored in.

3) You can come back to the analysis whenever you like, start where you left off and extend the analysis. This is particularly useful in the opening stage of the game, if you expect to play the same opening again and want to deepen your understanding of the positions that may arise. By doing this you can gradually build up your opening repertoire.

After the simple step of sending the positions from a game to IDeA and analyzing them, the question is what, if anything, you should do next. I would consider two options:

1) Link the game to the IDeA project and then go over the game with one or more engines. Make sure that the engines send their analysis to the IDeA project and you may also want to view the results of each engine in your tree configuration. In this way you will get a "second opinion" and new positions to analyze. Start IDeA again and analyze the additional positions suggested by the engines. Note that in this step and the previous one it's not necessary to have "Automatic tree expansion" enabled (Edit > IDeA tab > Automatic tree expansion (IDeA)).

2) Turn "Automatic tree expansion" on. Select a critical position in the game and set it as a root node. Analyze until you are satisfied with the results. Disable the root node. If there are other interesting positions in the game, do the same for them.

This should be more than enough for a player of your son's level. He gets the following information from these steps:

1) The results of the IDeA analysis of every position, both the score and the position count are displayed in the tree configuration

2) The IA results of the engines you used to analyze the game. You can add one column for each engine so you can see and compare their evaluations.

If you want to do deep opening analysis, you should create a special project for each opening (or opening variation). Otherwise the tree will become too big.
Up Topic Rybka Support & Discussion / Aquarium / IDeA: Reducing analysis time for suboptimal lines

Powered by mwForum 2.27.4 © 1999-2012 Markus Wichitill