Welcome Guest! To enable all features please Login or Register.
Options
Go to last post Go to first unread
ivan.ger  
#1 Posted : Thursday, February 22, 2018 11:42:17 PM(UTC)
ivan.ger

Rank: Member

Groups: Registered
Joined: 3/20/2017(UTC)
Posts: 10

Thanks: 1 times
Hi,
if I understand correctly Activation is one of the fundamental concepts of Embrio.
For example as I can see in Digital input node activation goes 1 when we have signal in DI and 0 when we don't. But Activation is a float value 0.0-1.0 (is it?) and we do programming in MC where memory is pricless and using float where bool can be used considered crime.
Tell me if I am wrong (I hope I am :) ), but if it is really float used in describing DI/DO state how that can be avoided? As I see I can not add bool value as an input or output of a node, can I?
EmbrioAdmin  
#2 Posted : Friday, February 23, 2018 4:47:04 AM(UTC)
EmbrioAdmin

Rank: Administration

Groups: Administrators
Joined: 12/11/2014(UTC)
Posts: 623

Thanks: 1 times
Was thanked: 36 time(s) in 33 post(s)
Yes it's true, Activation is the main data type. Embrio is kind of based on a simple brain model and activations are like neurons (at least how neurons are modeled when programming). Most logic in Embrio is done by multiplying two activations together, when they are both on the activation goes through and turns on something else, when one of them is off it "squeezes shut" the flow and the other thing doesn't turn on.

For simplicity currently all activations are a float value, even when the data they represent is really digital. You're right it is a bit wasteful. I think a "boolean" data type that can be plugged into an activation i/o would be a good idea, there have just always been higher priority things to implement. I will put that on top of my list though I think it's time to address that issue.
ivan.ger  
#3 Posted : Wednesday, October 03, 2018 9:09:08 AM(UTC)
ivan.ger

Rank: Member

Groups: Registered
Joined: 3/20/2017(UTC)
Posts: 10

Thanks: 1 times
Hello again. Its been a while since your reply. Are you still planning on implementing bools or refused that idea?
EmbrioAdmin  
#4 Posted : Saturday, October 06, 2018 6:46:05 AM(UTC)
EmbrioAdmin

Rank: Administration

Groups: Administrators
Joined: 12/11/2014(UTC)
Posts: 623

Thanks: 1 times
Was thanked: 36 time(s) in 33 post(s)
Hi,

Thanks for the reminder, I kind of forgot about this idea. I still don't like the idea of a whole new Input/Output type, but I do like the idea of adding a button to Activation inputs and outputs to limit the value to on or off. I put that on my high up todo list. In the UI it's an easy change, and shouldn't be too complicated in the compiling part, I'll look into it soon.

Is this a theoretical issue for you or are you running out of memory in some programs?
ivan.ger  
#5 Posted : Saturday, October 06, 2018 7:55:31 AM(UTC)
ivan.ger

Rank: Member

Groups: Registered
Joined: 3/20/2017(UTC)
Posts: 10

Thanks: 1 times
I'd say I have a restriction for creating custom nodes with bool type (true/false) inputs/outputs at the moment which are commonly used in different libraries for expample. And memory optimization is essential of course.
If u just add a button on/off to activation it would still be float type, right?
EmbrioAdmin  
#6 Posted : Saturday, October 06, 2018 8:45:20 AM(UTC)
EmbrioAdmin

Rank: Administration

Groups: Administrators
Joined: 12/11/2014(UTC)
Posts: 623

Thanks: 1 times
Was thanked: 36 time(s) in 33 post(s)
Currently there isn't really a restriction, just when you need to write

if (Input_Activation == true)

or something, you would write

if (Input_Activation > 0.5)

Logically there are no restrictions, the only down side is that you might have an activation using a float as it's memory storage when all it really only needs to be a bool.

I have some other ideas for how to save input/output memory which I need to weigh before going forward. For example, it's occurred to me that most of the time Activations don't need 4 bytes worth of resolution, often 2 or even 1 byte would be enough. Also, Arduino uses a full byte for a boolean value, and Embrio uses a lot of boolean values in the compiled code (one for each input that has connections). If I could figure out how to do bit logic to store 8 true/false values in 1 byte that would save a lot of memory. Both of those concepts together might make the ideas we are discussing moot.

I'll put this high on my list, I need to get to it eventually. I haven't focused too much on it yet because I haven't gotten any complaints of people running out of memory so I've been focusing elsewhere.
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error