Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2015-03-13 20:36:03, last edited by Zumza (2015-03-14 09:49:25)

Zumza
Member
From: root
Joined: 2015-02-17
Posts: 4,656

[Statistics] Best Delay For Sending Blocks

Definitions:  DBPB = Delay Between Placing Blocks
       RSB

while(queue.Count > 0)
{
     foreach(Block b in queue)
          if(WorldMap[b.Layer, b.X, b.Y].ID!=b.ID)
               SendBlock(b.Layer, b.X, b.Y, b.ID);
          else
               queue.Remove(b);
}

                  OBD = Optimal DBPB for RSB Algorithm



After taking an static using around 20 users I got this results(using the RSB Algorithm ):
OBD dosent have the same value as DBPB for no lag.
        => OBD < DBPB for no lag (this equation is tested on 20 users)
        Two different OBD may have the same effect (5 users got this)
        An lower DBPB may be faster than ODB (5 user got this)


So from 20 users we got:
      5 that better don't use ODB
      5 that have no benefits using ODB
      10 that have got a ~30% more benefits for using ODB


So 50% of 20 representative users got benefits from using ODB
They fill a world 30% faster using ODB
RSB Algorithm not with ODB is ~30% faster than traditional way (just sending of blocks witch is also laggy)
So RSB Algorithm with ODB is ~60% faster than traditional way


And the moment we all wait!!!
Whats The ODB value?!!!
The avarange ODB value is

Hidden text

Note:
The Queue must be randomised for best results.
I hope this helped you a lot. In first place even i didn't trusted this statistic but it really works!!! Seriously if you try this, the results will be amazing!


If someone else have tried to get the OBD value please post it here.
Feel free to comment.


Everybody edits, but some edit more than others

Offline

Wooted by:

#2 2015-03-13 21:00:52

ugotpwned
Member
Joined: 2015-02-16
Posts: 376

Re: [Statistics] Best Delay For Sending Blocks

Interesting but not very applicable because everyone's internet upload speeds are different. What would be useful is an algorithm that given your internet condition calculates an appropriate upload delay.

Offline

#3 2015-03-13 21:52:24

soulrunner
Member
Joined: 2015-03-10
Posts: 185

Re: [Statistics] Best Delay For Sending Blocks

ugotpwned wrote:

Interesting but not very applicable because everyone's internet upload speeds are different. What would be useful is an algorithm that given your internet condition calculates an appropriate upload delay.

<offtopic> Are you going to be bring back fish bot? </offtopic>

This seems cool. Shame I don't know much about coding //forums.everybodyedits.com/img/smilies/smile


l141.gif

Offline

#4 2015-03-14 16:12:07

Tomahawk
Forum Mod
From: UK
Joined: 2015-02-18
Posts: 2,847

Re: [Statistics] Best Delay For Sending Blocks

Get a bot to draw a 50x50 square of a block at a delay of maybe 20ms, then decrease the delay and repeat until blocks start being missed out.
Ofc, checking if a sent block was placed means missed blocks can be resent, making the "optimum delay" a little irrelevant, and ambiguous.

The minimum delay (assuming Thread.Sleep) before the EE serverside starts blocking packets for attempted DDOS, is 8-9ms.


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

#5 2015-03-14 16:40:00

Processor
Member
Joined: 2015-02-15
Posts: 2,246

Re: [Statistics] Best Delay For Sending Blocks

The exact delay you need is 10ms, anything lower than it is too fast, anything higher than that value is not using the highest potential available.

Now, the problem with Thread.Sleep is that it usually has a resolution of 15ms, and it only guarantees that at least that many milliseconds pass (Windows isn't a RTOS). Thread.Sleep(8) might get called after 15ms, or after exactly 8ms... Which probably means you are sleeping for ~11.5ms in average, thats why 8ms seems to work for you. //forums.everybodyedits.com/img/smilies/tongue

Now, the default resolution of 15ms will get altered when an application tries to use something that requires more accuracy. The most common cause is watching a video. The timer resolution on windows is a global variable which means once you start watching a youtube video, your bot will suddenly no longer get an average of 11.5ms, but 8ms. That causes blocks to be skipped again. lol

Therefore, you should all watch videos while running your bots, and keep your delays at 10ms. //forums.everybodyedits.com/img/smilies/big_smile
Or I mean, use (or copy the code from) a library that handles this in a proper way, like, uhh, BotBits >:D
(The block delay can be found here: https://github.com/Yonom/BotBits/tree/m … ssageSend)


I have never thought of programming for reputation and honor. What I have in my heart must come out. That is the reason why I code.

Offline

#6 2015-03-14 20:22:18

EuadeLuxe
Member
Joined: 2015-02-18
Posts: 12

Re: [Statistics] Best Delay For Sending Blocks

Btw, you should also take into account for Network Latency. So if you really want to be as accurate as possible you might even need to calculate the player's current ping.


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

C++, C#, Java, PHP, JavaScript and Python programmer
Enjoys developing all day
Don't believe it? Then verify me here, https://keybase.io/verify, and here: https://www.gommehd.net/members/blackypaw.32820/ (open the Informations tab and you'll find another PGP signature)
-----BEGIN PGP SIGNATURE-----
Version: Keybase OpenPGP v2.0.46
Comment: https://keybase.io/crypto

wsBcBAABCgAGBQJWCo8vAAoJEG4qS86NYi+iL1kH/Aq8bRm7tjZAqeBE4YBR0bJx
ao40xBbFsQ1KjZUnUgQosFP66H0JqlGmrJnyseyBLM+xccrkXapXN/T6csKTTzMy
dFV6i55+Jn/r1Y45+7yZHSYYZeG+OsFRin+Yvj0R69U6fuGLzDhfd9DFFlj0ORUw
qScy5/A0v+F9mLi+4a/fp9io4oF2kHiqzFNGCy4TueKgU5N+Um8UvhkNonLvRyvD
kOpjym8co4VLEDLfTVJgQAUhmmwW1NHvyaDDj9hjW4ERmhuX7ITwtrVdyAG6VhJB
DEN9SjkSTbGnvWepCv2xnqKmvXwyCXrds4d6Tt/wOz+794Optk8paYT/IO2RM2w=
=nW2J
-----END PGP SIGNATURE-----

Offline

EuadeLuxe1426360938482727

Board footer

Powered by FluxBB

[ Started around 1732213222.5614 - Generated in 0.375 seconds, 15 queries executed - Memory usage: 1.48 MiB (Peak: 1.61 MiB) ]