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 Before February 2015

Hexagon
Member
Joined: 2015-04-22
Posts: 1,213

Making bots more reliable -- queues

Hello,

I've bothered a few people about this on Skype; while I think it's a so-so idea I'd like to know what others think.

When a bot sends a block to the world there are opportunities in the program for too many blocks to be sent at once, causing "lag". My goal is to reduce this by creating an event queue (all blocks go in a queue) and then a delegator takes the blocks from the queue and allocates them to bots to place the blocks on the world. It would do so in an efficient manner (would not place blocks that have the exact same block id at a specified coordinate for example) and would wait until the block was placed on the world before it placed another one (using that same bot).

Feel free to critique. I'm thinking about not making it because it doesn't look like it would drastically improve performance (but I haven't done any tests). Does anyone know if this has already been implemented?

Last edited by Hexagon (Jul 8 2014 2:22:07 pm)

Offline

#2 Before February 2015

lrussell
Member
From: Saturn's Titan
Joined: 2015-02-15
Posts: 843
Website

Re: Making bots more reliable -- queues

I've had a similar idea. I kept a queue and just looped until it was empty, and every time a block was placed it would remove it from the queue. It works alright.

Offline

#3 Before February 2015

Jabatheblob1
Member
Joined: 2015-03-01
Posts: 856

Re: Making bots more reliable -- queues

I've tried to do it and it somewhat worked. Just a few things that would mess up. Say that you had a block at the same x and y and you wanted it to be placed but also deleted later. If there was enough lag it would just flicker back and forth. I was too lazy to carry it out and finish it.


If you would like me to make a bot for you, go here.

Offline

#4 Before February 2015

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

Re: Making bots more reliable -- queues

I did . Not major improvments.

Edit: sometimes did even 0. But most time even 12.(death time when i consider to send it again).

Last edited by The Doctor (Jul 7 2014 1:04:40 pm)


Everybody edits, but some edit more than others

Offline

#5 Before February 2015

Hexagon
Member
Joined: 2015-04-22
Posts: 1,213

Re: Making bots more reliable -- queues

I just simulated a long-running task and the events from PlayerIO were dropped if they belonged to a different type.

What I found out was that queues are a prerequisite; regardless if they speed up or slow down the application, in order to prevent events from being lost. Unless my testing is improper, I hope that tutorials that outline how to build a bot cover this aspect in order to prevent very odd errors.

Offline

#6 Before February 2015

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

Re: Making bots more reliable -- queues

What i dont understand is that server return data without any losts. Why bots have losts?


Everybody edits, but some edit more than others

Offline

#7 Before February 2015

Hexagon
Member
Joined: 2015-04-22
Posts: 1,213

Re: Making bots more reliable -- queues

The Doctor wrote:

What i dont understand is that server return data without any losts. Why bots have losts?

It's a possibility that events (of a different type that are not in the "processing" area) are being dropped because it's a single threaded application.

Offline

Hexagon1423757803203629

Board footer

Powered by FluxBB

[ Started around 1713595751.0407 - Generated in 0.035 seconds, 12 queries executed - Memory usage: 1.44 MiB (Peak: 1.56 MiB) ]