Understanding ABM chance

User avatar
neko259
Member
 
Posts: 769
Joined: Sun Jun 19, 2011 06:51

Understanding ABM chance

by neko259 » Sun Apr 01, 2012 19:24

I don't remember if I asked this already. I try to get ABM working but it' very weird. No matter what chance I set (even 200-300), it always works on every node when I start the game.
Bitcoin donations: 18r66dJmUjwTmWRTFnorpGMzs8d4B8jzbw
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Sun Apr 01, 2012 20:38

Thats a Bug
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
neko259
Member
 
Posts: 769
Joined: Sun Jun 19, 2011 06:51

by neko259 » Sun Apr 01, 2012 20:44

Does celeron know that?
Bitcoin donations: 18r66dJmUjwTmWRTFnorpGMzs8d4B8jzbw
 

User avatar
bgsmithjr
Member
 
Posts: 436
Joined: Thu Mar 08, 2012 23:21

by bgsmithjr » Sun Apr 01, 2012 22:48

that's a bug? It seems right to me.To have an interval you have to have a starting point.
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Sun Apr 01, 2012 23:32

bgsmithjr wrote:that's a bug? It seems right to me.To have an interval you have to have a starting point.


Actually the issue is that ABMs are being run far too often when the server starts.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

User avatar
neko259
Member
 
Posts: 769
Joined: Sun Jun 19, 2011 06:51

by neko259 » Mon Apr 02, 2012 04:55

bgsmithjr wrote:that's a bug? It seems right to me.To have an interval you have to have a starting point.

I complain about chances, not intervals. They are just ignored and I have to add manual randomness to the functions, which is not nice.
Bitcoin donations: 18r66dJmUjwTmWRTFnorpGMzs8d4B8jzbw
 

kahrl
Member
 
Posts: 236
Joined: Fri Sep 02, 2011 07:51

by kahrl » Mon Apr 02, 2012 05:07

Temperest wrote:
bgsmithjr wrote:that's a bug? It seems right to me.To have an interval you have to have a starting point.


Actually the issue is that ABMs are being run far too often when the server starts.


The reason is that minetest simulates the "lost" time when loading an existing world. Maybe it should be possible to switch this behaviour off with a flag in the ABM definition.
 

celeron55
Member
 
Posts: 430
Joined: Tue Apr 19, 2011 10:10

by celeron55 » Mon Apr 02, 2012 12:42

It is intended behaviour that when a MapBlock becomes part of the active area, the time of it not being active while the server has been running is calculated and an estimate is made to roughly trigger as many of the ABMs as would have been triggered during the time. This is preferred behaviour for things like grass growth.

It could be a bug if all of the ABMs are triggered immediately when you shut down the server and start it again. However, this isn't clear based on what you said.
 

User avatar
bgsmithjr
Member
 
Posts: 436
Joined: Thu Mar 08, 2012 23:21

by bgsmithjr » Mon Apr 02, 2012 17:00

You are not taking into consideration how many blocks there are in the game and it cycles through every one.
if there are 600,000 blocks and you put the chance to be 5
1/5 = .2 * 100 = 20 % chance
Roughly 120,000 blocks will have the action happen
Then you just so happen to be surrounded by more than you thought so it looks like more not too mention whether or not it generates them evenly or in clusters.
20% of the blocks will have the action happen. No bug.
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Mon Apr 02, 2012 17:40

bgsmithjr wrote:You are not taking into consideration how many blocks there are in the game and it cycles through every one.
if there are 600,000 blocks and you put the chance to be 5
1/5 = .2 * 100 = 20 % chance
Roughly 120,000 blocks will have the action happen
Then you just so happen to be surrounded by more than you thought so it looks like more not too mention whether or not it generates them evenly or in clusters.
20% of the blocks will have the action happen. No bug.

You just blew my mind.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

User avatar
neko259
Member
 
Posts: 769
Joined: Sun Jun 19, 2011 06:51

by neko259 » Mon Apr 02, 2012 17:53

bgsmithjr wrote:You are not taking into consideration how many blocks there are in the game and it cycles through every one.
if there are 600,000 blocks and you put the chance to be 5
1/5 = .2 * 100 = 20 % chance
Roughly 120,000 blocks will have the action happen
Then you just so happen to be surrounded by more than you thought so it looks like more not too mention whether or not it generates them evenly or in clusters.
20% of the blocks will have the action happen. No bug.

I have 2-3 trees with leaves. Chance is 300. At the server start all of the trees grow infinitely up (to the ABM range), and 100% of leaves turn into blossom. What am I doing wrong?
Last edited by neko259 on Mon Apr 02, 2012 17:54, edited 1 time in total.
Bitcoin donations: 18r66dJmUjwTmWRTFnorpGMzs8d4B8jzbw
 

User avatar
bgsmithjr
Member
 
Posts: 436
Joined: Thu Mar 08, 2012 23:21

by bgsmithjr » Mon Apr 02, 2012 19:24

lol
 

User avatar
bgsmithjr
Member
 
Posts: 436
Joined: Thu Mar 08, 2012 23:21

by bgsmithjr » Mon Apr 02, 2012 19:28

neko259 wrote:
bgsmithjr wrote:You are not taking into consideration how many blocks there are in the game and it cycles through every one.
if there are 600,000 blocks and you put the chance to be 5
1/5 = .2 * 100 = 20 % chance
Roughly 120,000 blocks will have the action happen
Then you just so happen to be surrounded by more than you thought so it looks like more not too mention whether or not it generates them evenly or in clusters.
20% of the blocks will have the action happen. No bug.

I have 2-3 trees with leaves. Chance is 300. At the server start all of the trees grow infinitely up (to the ABM range), and 100% of leaves turn into blossom. What am I doing wrong?


Sorry for showing off, poster, but what I was supposed to say was that..
Maybe you forgot that hidden blocks also have the code applied.
like for ever dirt you add a grass block, then you would have more blocks than you intended because you only wanted the ones on top.
 

User avatar
neko259
Member
 
Posts: 769
Joined: Sun Jun 19, 2011 06:51

by neko259 » Mon Apr 02, 2012 19:29

Hidden trees? Where?
Bitcoin donations: 18r66dJmUjwTmWRTFnorpGMzs8d4B8jzbw
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Mon Apr 02, 2012 19:30

That's such a point. Explains why mesecons can "error".

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

User avatar
bgsmithjr
Member
 
Posts: 436
Joined: Thu Mar 08, 2012 23:21

by bgsmithjr » Mon Apr 02, 2012 19:32

What?
Is your problem solved, with the post about the game catching up when shut off?
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Mon Apr 02, 2012 19:45

Should be that.

I have a easy example:

Say I have this 16 by 16 chunk.

Then say a flower grows.

Then I leave the chunk for TWO MINETEST HOURS.

I load that very chunk again, from what it seems, the chunk now has more flowers.

Minetest does this to ensure abms work (just like a pseudo random nuber generator,) like time has flown there when it has not.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

User avatar
neko259
Member
 
Posts: 769
Joined: Sun Jun 19, 2011 06:51

by neko259 » Thu Apr 05, 2012 16:58

I still wait for the final answer: when will I be able to get rid of manual chance checks? Now if I remove them, on the server start I get huge lags and ABM working for EVERY block and ruining all it's work.
Bitcoin donations: 18r66dJmUjwTmWRTFnorpGMzs8d4B8jzbw
 

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

by Gatharoth » Fri Apr 06, 2012 08:22

neko259 wrote:I still wait for the final answer: when will I be able to get rid of manual chance checks? Now if I remove them, on the server start I get huge lags and ABM working for EVERY block and ruining all it's work.


You should post a snippet of your code so people can actually look at it and tell you. Because with the information you provide, all anyone can tell you is how they work.

Which everyone keeps repeating over again to you.
 

User avatar
neko259
Member
 
Posts: 769
Joined: Sun Jun 19, 2011 06:51

by neko259 » Sat Apr 07, 2012 17:01

Gatharoth wrote:
neko259 wrote:I still wait for the final answer: when will I be able to get rid of manual chance checks? Now if I remove them, on the server start I get huge lags and ABM working for EVERY block and ruining all it's work.


You should post a snippet of your code so people can actually look at it and tell you. Because with the information you provide, all anyone can tell you is how they work.

Which everyone keeps repeating over again to you.

https://bitbucket.org/neko259/nature

Look into any of the code with growing.
Bitcoin donations: 18r66dJmUjwTmWRTFnorpGMzs8d4B8jzbw
 

User avatar
mauvebic
Member
 
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Sun Apr 08, 2012 10:19

growing_trees is pretty similar to nature but they dont act the same, maybe that might help?
"Fuck the hat." - Paulie Gualtieri
 

User avatar
neko259
Member
 
Posts: 769
Joined: Sun Jun 19, 2011 06:51

by neko259 » Mon Apr 09, 2012 20:28

Fixed in the latest git version.
Bitcoin donations: 18r66dJmUjwTmWRTFnorpGMzs8d4B8jzbw
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 8 guests

cron