Not logged inRybka Chess Community Forum
Up Topic Rybka Support & Discussion / Aquarium / Scripter : AdvancedTaskCreator
1 2 Previous Next  
- - By buffos (Silver) Date 2011-03-17 08:33 Edited 2011-03-23 23:48
This is one of my favorite (and most used script). Now what it does
You have in IDEA,

a)current position task, that analysed current position
b)alternative task, that creates an alternative for the current position
c)prolongation task, that prolongs the current position, as long as you like
d)custom task, that creates as many alternatives as you like for the current position and prolongs them for as many plies as you like

AdvanceTask is a generalized task, that has each one of them as a special case. It creates mini-trees, based on conditions.

Let me explain that a bit.
1) First it will ask you how long the tree you would like to be. It like the prolongation task length. Easy to understand
2) Then it would ask you for 2 important parameters. Alternatives Profile and Move Selection Profile

Let me elaborate on those.
Alternatives Profile could be a single number OR a series of comma separated numbers.
If its a single number. For example 6. That means , you want for every position to create 6 alternatives

Move Selection Profile is how many of the 6 above alternatives, are considered main and would be extended. This is for greater customization of the trees that can be created (i could ommit that and set it the same as ALt Profile.

So if you set Alt_Profile and MoveSelection Profile , both to 6, you will get a COMPLETE tree, with 6 alternatives per move. If you did set length = 5 for example that would be 6^5 number of tasks =7776 tasks!!
If you had set MoveSelection = 1 and prolongation length = 5 that would  mean that

*** You have 6 alterantives on the first move and select only 1 to be extended , so next step just one move is extended and again 6 alternatives are generated (the previous 5 are not prolonged), and then again, the best move is prolonged and for the next position 6 alternatives are generated.. and so on. That is till we reach depth 5, so 5*6 = 30 tasks are created

*** if MoveSelection = 2 that would mean, that 6 alternatives where generated for start position, then pick 2 to extend. for the 2, 6 alternatives are generated (so 6+2*6) and then from each of those 2 6-packs 2 are selected from each and extended... so we have 2^2*6... and then 2^3*6... and so on.... I understand that if you try to forecast the tree, its frustrating so DON'T (unless you are familiar with that).

KEEP IT SIMPLE (at least in the beginning). Anyway, probably better, its to keep Alternatives profile and MoveSelection profile the same.

*** But there is more. Alternatives Profile, can be MORE than a single number it can be a comma separated string.
For example Alternatives Profile= 6,4,3,1

What does that mean. It means, at depth 1, 6 alternatives are created, and then at depth 2 , 4 alternatives.. and then at depth 3 , 3 alternatives and then from depth 4 and on just 1 alternative...
This is logical, because you don't want as you go deep to continue going as wide as in the beginning!!
Ofcourse in this case , you HAVE to set the MoveSelection profile accordingly (for example use the same string)

*** Now if i write  Alternatives Profile= 6,4,4,3,1
it means that at depth 2 and 3 i will get 4 alternatives , at depth 4, 3 alternatives and from 5 and on just one.

Ofcourse any data in the tree is USED. That means, if you ask for 6 alternatives for a position, and there are 3 already in the position, then just 3 more a generated.


Just copy the attached files to Ascripts folder . When you run it, you run the AdvancedTaskCreator.tsc , the other one is just some utilities that create the dialog box in the beginning of the script.
Settings you enter are saved, and next time you run it they are remembered.


a) You are in IDEA mode
b) First put a position (or positions) in the CRITICAL list (from the notation, write click, add note, critical )
c) Now Run the script. Every position in that critical list will be processed and iteratively the tree would be build for each and every one of the positions in there.
d) When the script finished it would pop up a window and say Finished. No more positions to analyse in the Critical List

Then you can go on, and use IDEA as usual.

The script reads project bound, so even if you for example have Alternatives = 6 , move selection = 6 , and you have project bounds set to 0 to 100 , then any move outside that range will not be prolonged... so you will NOT get a complete 6-way tree
This is an additional option to shape up your tree as you like!!! And its a very powerful one.


1) There is no STOP mechanism for the script (like every script), so NEVER stop it, because variables are not freed, and you will have crashes

>he third repetition led to a tree, but only a very small tree (with 6,4,3,1)

2) If you want to exit fast, remove positions from critical list and the script will finish very fast. DO NOT exit Aquarium or try to stop it in any other way.
Variables need to be freed to avoid crashes


It would be better if you have your queue clean before starting the script. To do that, simply disable Autoprolonge, and let all tasks finish. Then run the script.

Hope you like it. Waiting for your comments
Attachment: U_BF_DialogEditor.tsc (4k)
Parent - By Moz (****) Date 2011-03-17 16:17
Thanks for making this public. I use it all the time. It's great for rapidly expanding and shaping a tree.

Highly recommended!
Parent - - By ventura07 (***) Date 2011-03-17 16:22
Thank you very much for all your work on explaining and developing the scripts.
Parent - By buffos (Silver) Date 2011-03-17 16:27
thx a lot both :red:
Parent - - By ppipper (*****) Date 2011-03-17 23:14
buffos, still having some problems:

Trying to run the script I am getting an internal error: Library 'U_BF_DialogEditor' not found.

However, both scripts are really located into my D:\AquariumData\AScripts folder.

Can you help me?

Thx a lot
Parent - - By buffos (Silver) Date 2011-03-18 05:15
It really should not happen.
Do you use a NON ENGLISH version (i am just trying to identify the problem)

Another Question. Go to the Scripter window (enable it first). Load the code, and go to where you see on the attached picture.
What paths do you see?
Parent - - By ppipper (*****) Date 2011-03-18 09:35
I am using English version, both Aquarium + scripter.

I only see $(CURDIR) and $(APPDIR). If I select one of them and press SetPath button, they are not currently pointing to any folder. Probably this is the error?

What folders should I set for both variables?
Parent - - By buffos (Silver) Date 2011-03-18 09:40
For a temp fix please look at this post

This is a scripter bug, i thought it was fixed .... :sad:
Parent - By ppipper (*****) Date 2011-03-18 09:50
done, working!

many thanks!
Parent - - By kinsinger Date 2011-03-29 22:50
Hi buffos - I've run into the same problem as ppipper and am trying to solve it by correcting the scripter search list.  But I can't get the scripter window to open.  I think one of your posts referred to enabling the scripter window before opening a script and showing the window.  If so, thats what I'm missing.  How does one enable scripter?
Parent - - By nebulus (****) Date 2011-03-29 23:42

> How does one enable scripter?

1. Switch to Scripter tab and click on Show/Hide button so it's enabled.
2. Activate Scripter window from the Layout Menu.
Parent - - By kinsinger Date 2011-03-30 15:15
Thanks, that of course worked.  I expected the Show/Hide button to show or hide the scripter window, not enable it to be shown from another place.  Ribbon buttons typically initiate actions, not enable them for initiation elsewhere.  Configuation choices, for example to enable or disable certain features or windows, are usually done in a "preferences" menu or configuration file.
I'm finding Aquarium an immensely powerful and useful program, but I think it is unnecessarily hard to learn due to unecessary complexity in its user interface and rather scattered documentation.
Parent - - By buffos (Silver) Date 2011-03-30 17:18

> I expected the Show/Hide button to show or hide the scripter window

well since it reveals the script window, it protects a novice user from doing any harm.
If only it correctly recognized the Uses files, you wouldn't need to reveal the script window.

So basically it correctly deeply hides the script window, but it fails due to a small bug (recognizing files used in uses statements placed inside Atree directory)

Scripter is an very very very powerful tool. I really look forward other users publishing their scripts.
Parent - By kinsinger Date 2011-03-30 23:00
Boffos -  I was not questioning the appropriateness of the enable / disable (aka show / hide) function, only its control from a highly conspicuous ribbon button.  I'm new to this forum and Aquarium so don't know if you're an Aquarium author or an early adopter expert user.  In either case, thanks for a script that greatly addsto its utility.
Parent - By retep1 (***) Date 2011-03-18 00:31
I start the script an see this - what's wrong here? Both files are in the AScript folder.
Attachment: notfound.jpg (430k)
Parent - - By buffos (Silver) Date 2011-03-23 12:32
ReUploaded the script. It had a stupid Exit statement forgotten somewhere in the code, and it would always say "finished...."

No one (but pipper) complained here, so i guess no one was interested in the script!!!
Parent - - By keoki010 (Silver) Date 2011-03-23 15:30
Hey I'm using it. I thought it was supposed to do that! :lol:
Parent - By buffos (Silver) Date 2011-03-23 15:50
so it actually did not do anything for you :smile:
Parent - - By Xaggard (**) Date 2011-03-29 17:17
Can you create a video tutorial on how this script is working.
I run it, wait and can not see any output so I even do not know whether it's working or not :mad:
Parent - - By buffos (Silver) Date 2011-03-29 17:20
what do you do?

the basic steps are

1) Start IDEA and make the project you want active
2) It would be better to have the queue empty so you can see the script tasks at once (so disable auto-expansion and clear the queue)
3) Put 1 or more positions in the critical list
4) Only NOW you can start the script...

You will see now tasks created (and since they are NOT from autoexpansion , they are from the script)
Parent - By Xaggard (**) Date 2011-03-29 17:44
Ok. Thank you. I will try this way.
Parent - - By Xaggard (**) Date 2011-03-29 17:56

Is it working now or not? :red:
How long should I wait till can close Aquarium?
Parent - - By buffos (Silver) Date 2011-03-29 18:12 Edited 2011-03-29 18:18
I cannot see in this picture if

a) IDEA is ON??
b) Project is active??

The positions in the tree were created by IDEA or by the script?

(i have not tested the script were the lines do not start from start position (altough there is code to support it). Moz tried it and said it works there too (but i havent tried it myself)

>How long should I wait till can close Aquarium?

when the script finished it pops up a dialog box saying.. finished... etc... (so if you deactivate the project.. it would soon tell you that)
Parent - - By Xaggard (**) Date 2011-03-29 18:46

> a) IDEA is ON??


> b) Project is active??


> The positions in the tree were created by IDEA or by the script?

by IDeA, I don't know how the script is working :(
Parent - By buffos (Silver) Date 2011-03-29 18:49
i found and fixed a bug.
Please download the new version. This should work now.

If its not working, we will fix it :smile:
Parent - - By buffos (Silver) Date 2011-03-29 18:42 Edited 2011-03-29 18:48
i found a bug in projects that do not start from start position (a very very stupid one :smile:)

Uploading now version 1.3 (its actually 1.03).

This version will also exit at once the script if you de-activate the project or stop idea.

Thx for the screenshot. Now everything should run smoothly.

Next version would be an addition (new project bound settings)
Parent - - By Xaggard (**) Date 2011-03-29 18:57

Parent - - By buffos (Silver) Date 2011-03-29 18:58 Edited 2011-03-29 20:22
i guess you pressed open to load the script before running it. Correct??
Before pressing RUN, you have to OPEN the script (load it).

Also you have to make the trick above as shown above (for the utility path)
Parent - - By Xaggard (**) Date 2011-03-29 19:25

> i guess you pressed open to load the script before running it. Correct??
> Before pressing RUN, you have to OPEN the script (load it).

Now I have that


And yes, I placed both files to the AScripts folder

Parent - - By buffos (Silver) Date 2011-03-29 20:13
but you did not look at the beginning of the thread my answer to pipper :smile:

I have a picture attached there too.
Parent - By Xaggard (**) Date 2011-03-29 22:08
Oh yea! Now it works! After setting a proper path to my AScripts folder! :yell: :cool:
Thanx so much I will test it!
Parent - - By Sanaz (*) Date 2020-02-03 11:09
As soon as I run the script, it pops up: "Finished.No more positions or Project not Active or Idea stopped.". And nothing happens. I have set 1 critical position, Idea is active and script is enabled.
What am I doing wrong?
Parent - - By dickie (**) Date 2020-02-03 17:50
From AQ 2016 onwards we have Tree Generation Strategies which replace (and possibly improve on?) the old buffos script. Not sure what might be going wrong with your use of the old script.
Parent - - By Sanaz (*) Date 2020-02-04 09:40
Thank you for taking your time. I tried to create a 4,4,3,3,2,2,1,1,1,1,1,1,1,1 => 14 plies, 7 moves deep, using xml, but it didn't work properly. I used notepad and edited one of the Tree Generation Strategies. It starts and ends but doesn't work the way I described it above. It never goes deeper than 8 plies and creates too many alternatives in the first ply.
Parent - By dickie (**) Date 2020-02-04 15:27
I made a few new strategies by modifying existing strategies as you have done. It was a long time ago and I remember trying 2 or 3 times before I got it right. Maybe the strategies will not work beyond 8 plies, but I don't know. I'm afraid at the moment I do not have enough time to experiment. Perhaps someone else proficient with strategies can help?
- By Moz (****) Date 2011-03-17 16:30
I should add that this script is invaluable to anyone interested in learning more about Scripter. I've stolen more ideas and code snippets from this script than any other!
- - By buffos (Silver) Date 2011-03-24 12:55
The script had a bug that cause all those problems

Million thx to Volodya, for finding the bug and fixing it.

Please download both those files in order for the script to work correctly.

There is another "feature" now in the script. If you STOP IDEA, or DE-Activate the project, the script stops, so no need to empty the list in order to Exit the script. Just deactivate the project and it would soon stop.

You then have to manually enable AutoProlongation of the project (if you want to continue that way).
Parent - - By retep1 (***) Date 2011-03-24 17:31
thx for the new scripts - one question - where are the mini-trees stored - in "infinitve analysis.hsh"?
Parent - By buffos (Silver) Date 2011-03-24 17:33
in your IDEA tree. As you see the script , just creates tasks in order to make those trees iteratively.

There are more bugs (i think, and i am working on it)
- - By buffos (Silver) Date 2011-03-24 19:34
One more BUG fixed. Now everything should run smoothly.
Parent - - By retep1 (***) Date 2011-03-25 12:16
could it be that at the end of the stage tere is an never ending minimax?
Attachment: criticalmoves.png (259k)
Parent - - By buffos (Silver) Date 2011-03-25 12:58
no. do you by any chance interact with idea while the script is running;
The script has nothing to do with minmaxing.
Parent - - By retep1 (***) Date 2011-03-25 13:04
only clicking on "a", "f" etc. and moving forward/backward through the notation/tree, but this is allowed, isn't it?
Parent - By buffos (Silver) Date 2011-03-25 13:57
yes of course it is (interactive usage is also allowed until someone discovers a problem)
Parent - - By buffos (Silver) Date 2011-03-25 14:01
did an Aquarium restart solve the problem?

it works fine here (hopefully after so many problems, cause by just 2 lines of code...)
Parent - - By retep1 (***) Date 2011-03-25 16:45
it works at the end as described (see picture) - cores inaktiv, endless minimaxing.
Attachment: criticalmoves.png (66k)
Parent - By buffos (Silver) Date 2011-03-25 17:37
1) is the project Active?
2) if you close and restart aquarium and then set "auto expansion on" in project settings does it work?
3) if you manually minimax does it complete? (without the script ever running)
4) have you tried another project? tree?
- - By ppipper (*****) Date 2011-03-29 12:00 Edited 2011-03-29 12:04
Hi buffos, I am using 1.2 version of your script:

1) It looks much more stable than before, no crashes at all.

2) However, I still think something is not working or I am not using it properly:
- IDeA running, project active, two critical positions in the list. Using default script settings (5-5-5)
- I run the script and I can see "Analyzing" in the stage name. But only a few cores seem to be working.
- After a while, stage name is continuously switching between "There are no tasks in the project" and "Minimaxing".
- Actually positions are being added to Analyzed tasks number, but I really don't know what cores are processing them, since I only see gray boxes and cores count says IDeA: 0 of 8 engines, tree: idle

So, it seems that tasks are being added, but not all the cores (maybe just one) are working on them.

Hope this helps.

EDIT: analyzed tasks number is always being incremented by 6 steps
Parent - - By buffos (Silver) Date 2011-03-29 12:22
In the first steps, few tasks are generated. Only in later steps, more tasks are generated.
So in some passes you might have only few tasks (and cores inactive)
Parent - - By ppipper (*****) Date 2011-03-29 12:34
Yes, after a while I already can see some more info, now I think is OK.

Two more questions:

- With default settings, I should expect 5^5 tasks per position before the script ends?
- When is all this stuff going to the tree? Once the script is finished and I enable normal auto prolongation?
Up Topic Rybka Support & Discussion / Aquarium / Scripter : AdvancedTaskCreator
1 2 Previous Next  

Powered by mwForum 2.27.4 © 1999-2012 Markus Wichitill