Can Weights be modified via Script?

This forum is dedicated to everything about MemBrain Scripting. All Questions or other contributions with respect to scripting should be placed here.
Especially, if you have an interesting script that you might want to share with other MemBrain users, please post it within a new topic in this forum. Try to choose a title for your topic that allows other users to quickly identify the basic purpose of your script.
MrCreosote
Posts: 55
Joined: Wed 21. Jul 2010, 17:43

Can Weights be modified via Script?

Postby MrCreosote » Mon 22. Nov 2010, 19:19

I'm trying to do my own custom Randomization and I cannot see any way to do this. All the ways I have found require mouse selection.

Perhaps there is a way to modify the .mbn file?

Thanks in advance,
Tom

User avatar
Admin
Site Admin
Posts: 438
Joined: Sun 16. Nov 2008, 18:21

Re: Can Weights be modified via Script?

Postby Admin » Thu 25. Nov 2010, 06:25

MrCreosote wrote: All the ways I have found require mouse selection.

This is not quite true: They require selection but not necessarily with the mouse, it can be done by csripting, too.

For example the NetEditor script class that is part of the scripting example downloads, uses this method.
However, it's quite slow and a bit of scripting implementation work.

You might want to take a look into the NetEditor script class, this may provide some useful hints on how to select items through scripting.

Regards,
Thomas
Thomas Jetter

MrCreosote
Posts: 55
Joined: Wed 21. Jul 2010, 17:43

Re: Can Weights be modified via Script?

Postby MrCreosote » Mon 29. Nov 2010, 19:58

I can see how to Create a Link between two different nodes:

void ConnectInputToOutput()

however, I cannot see how to select the Link so I can get at its Properties.

Maybe the commands:

void SelectLinksFromExtra() and
void SelectLinksToExtra() ?

Could find no examples of Link editing in NetEditor class.

Thanks
Tom

User avatar
Admin
Site Admin
Posts: 438
Joined: Sun 16. Nov 2008, 18:21

Re: Can Weights be modified via Script?

Postby Admin » Thu 2. Dec 2010, 06:22

MrCreosote wrote:Maybe the commands:

void SelectLinksFromExtra() and
void SelectLinksToExtra() ?


Yes, basically the only way to select links is by defining their corresponding source and target neuron(s).
Once selected the links can be edited through their data properties structure 'SLinkProp'.
Thomas Jetter


Return to “Scripting”