MoveGeneratorCombinator documentation discrepancy

22 views
Skip to first unread message

Robert Koch

unread,
Feb 27, 2020, 2:45:44 PM2/27/20
to fullrmc
Hey everyone,

It looks like "MoveGeneratorCombinator" is looking for the kwarg "combination" but the documentation here still states it's looking for the kwarg "collection"

Just a heads up.

cheers,
Rob

Bachir Aoun

unread,
Mar 5, 2020, 8:37:59 PM3/5/20
to fullrmc
Hi Robert,

Thank you for sharing :) i hope everyone does the same ...
i am not sure what documentation are you referring to though. on my end the documentation is up to date. see screenshot attached. Am i looking at the correct thing ?

Screen Shot 2020-03-05 at 7.34.50 PM.png


Robert Koch

unread,
Mar 9, 2020, 2:54:16 PM3/9/20
to fullrmc
Hi Bachir,

No worries! we're all in this together, afterall.

If one goes here:

one finds the following code:

for g in ENGINE.groups:
    # create translation generator
    TMG = TranslationGenerator(amplitude=0.2)
    # create rotation generator only when group length is bigger than 1.
    if len(g)>1:
        RMG = RotationGenerator(amplitude=2)
        MG  = MoveGeneratorCombinator(collection=[TMG,RMG],shuffle=True)
    else:
        MG  = MoveGeneratorCombinator(collection=[TMG],shuffle=True)
    g.set_move_generator( MG )
Which i think, strictly speaking, will not run in the current version.as MoveGeneratorCombinator is passed the collection kwarg.

So, it looks like the documentation proper is correct, but the example has an error.

Cheers,
Rob

Bachir Aoun

unread,
Mar 10, 2020, 9:57:47 AM3/10/20
to fullrmc
Oh yeah, will fix this example snippet ! thanks 
Reply all
Reply to author
Forward
0 new messages