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-08-30 11:23:55, last edited by Processor (2015-08-31 05:39:37)

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

[Challenge] UploadTest problem

(Disclaimer: This is a side-project of mine and not related to my role as a game/forum administrator)

I'd like to see how many people are able to solve this problem.

Many people have written their own solutions to deal with the block placement limit EE contains. This test puts those algorithms to the test:

Goal: Write a block checking algorithm that passes the given test.

Background: This test checks your code's capability to deal with multiple blocks placed on the same spot. Common sense tells me that if I place block A and then block B on the same spot, block B must always be the final block placed on this spot. However, almost every algorithm that exists does not guarantee this. If block A fails to place, block B will be placed and then later replaced by block A (because obviously, this block missed and should be placed again (or should it?))

Test: https://gist.github.com/Yonom/83226bd5e94e6319a090

Guide: Edit UploadTest class so it places blocks using your algorithm. Then, execute the following statements after joining an empty world (minimum size 100x100).

var test = new UploadTest(con);
test.Test();
// TODO: wait for block placement to finish
test.Check();

Note: You may ONLY edit lines above the "DO NOT EDIT ANYTHING BELOW THIS LINE" line. UploadTest MUST inherit UploadTestBase. You are allowed to edit the constructor of UploadTest to add new parameters. You are not allowed to use types inside System.Reflection to tamper with UploadTestBase.

Results: The Check(); function will print the results in the console. Let me know if you manage to pass the test, and how many points you got!

If you'd like to add your algorithm to the list below, publish the source on pastebin/github/whatever and I'll link it down here.

Correct solutions: (Must achieve at least 1 score points)

  • Zumza - 4000 Points - ~150s - Source


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

Wooted by: (2)

#2 2015-08-30 11:36:10

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

Re: [Challenge] UploadTest problem

Whats the point of not editing the UploadTestBase?
If some programmer doesn't want to implement UploadTestBase its disqualified or something?


Everybody edits, but some edit more than others

Offline

#3 2015-08-30 11:39:48, last edited by Processor (2015-08-30 11:41:14)

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

Re: [Challenge] UploadTest problem

Zumza wrote:

Whats the point of not editing the UploadTestBase?
If some programmer doesn't want to implement UploadTestBase its disqualified or something?

UploadTestBase implements the actual testing part. It contains the rules for this test, which you can not change.
You must implement UploadTestBase otherwise you did not complete this challenge.
When you call test.Test(); UploadTestBase calls your Upload(layer, x, y, block); function to upload a few blocks. When you call test.Check(); it checks if these blocks were placed correctly.

If you were able to edit this file, what's holding you back from giving yourself a pass and 1 000 000 score? //forums.everybodyedits.com/img/smilies/tongue


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

#4 2015-08-30 11:48:28

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

Re: [Challenge] UploadTest problem

Processor wrote:

If you were able to edit this file, what's holding you back from giving yourself a pass and 1 000 000 score? //forums.everybodyedits.com/img/smilies/tongue

My volition for making the best algorithm.


Everybody edits, but some edit more than others

Offline

#5 2015-08-30 13:33:53

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 1,025

Re: [Challenge] UploadTest problem

The problem is that you'd have to check this on the same system to get a fair rating.
Some people have slow internet (like I used to have), while others have really fast.

the only moment you'd need this algorithm is when you have slow internet, because you wouldn't be able to place blocks at the 10ms delay.

Offline

#6 2015-08-30 13:41:26, last edited by Zumza (2015-08-30 13:44:18)

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

Re: [Challenge] UploadTest problem

den3107 wrote:

The problem is that you'd have to check this on the same system to get a fair rating.
Some people have slow internet (like I used to have), while others have really fast.

the only moment you'd need this algorithm is when you have slow internet, because you wouldn't be able to place blocks at the 10ms delay.

The idea is to calculate the optimum delay for any system & internet speed in order to archive the fastest block upload.

Btw can we use multiple connections?


Everybody edits, but some edit more than others

Offline

#7 2015-08-30 14:27:16

hummerz5
Member
From: wait I'm not a secret mod huh
Joined: 2015-08-10
Posts: 5,853

Re: [Challenge] UploadTest problem

Why are you looking for correct solutions for this? If your reason for limiting the rate is purely to slow down bots, you'll probably block any method that gets points.

Are we sharing the "correct solutions"

Offline

#8 2015-08-30 15:51:44, last edited by Zumza (2015-08-31 10:41:56)

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

Re: [Challenge] UploadTest problem

Hidden text
Hidden text

Everybody edits, but some edit more than others

Offline

#9 2015-08-31 05:23:40, last edited by Different55 (2015-08-31 19:27:28)

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

Re: [Challenge] UploadTest problem

Zumza: Very impressive, you are pretty close //forums.everybodyedits.com/img/smilies/wink

The reason the check wasn't working was because you called base.Check() BEFORE the blocks reached the server and back to you. (so they weren't technically placed yet.)
I added a Thread.Sleep(1000); line before the Check function call to temporary fix this. //forums.everybodyedits.com/img/smilies/tongue

Your algorithm worked fine 3/5 times I tried it, but it also failed twice. I also changed the delay between blocks from 8ms to simulate some network lag.

Failed attempt #1: language (Block delay was 7ms)
Failed attempt #2: https://sepi.me/BetweenDecisiveGrandFormal.png (Block delay was 8ms)

You probably need different block delays to come up with the same results. Feel free to PM me if you are having issues reproducing it. //forums.everybodyedits.com/img/smilies/big_smile

hummerz5 wrote:

Why are you looking for correct solutions for this? If your reason for limiting the rate is purely to slow down bots, you'll probably block any method that gets points.

Are we sharing the "correct solutions"

Sorry if I failed to make this  clear in the first post. I'm posting this as a community member and bot programmer, not as an EE Admin trying to block bots. The current limit has existed for a long time and we have no plans to lower it.

I write bots myself and have to work with this limit. I'm looking new methods that might be superior to my own. This test checks if your algorithm can handle multiple blocks placed on the same spot.
You are free to not share how your algorithm works, but to get your algorithm added to the list above, you do need to share your source.


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

Wooted by:

#10 2015-08-31 10:42:44

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

Re: [Challenge] UploadTest problem

Hidden text

Code at: http://pastebin.com/RNcUSxdS


Everybody edits, but some edit more than others

Offline

Wooted by:

#11 2015-09-02 07:25:42

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

Re: [Challenge] UploadTest problem

Looking good. Nice job!


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

Wooted by:
Processor1441175142537689

Board footer

Powered by FluxBB

[ Started around 1732459313.7815 - Generated in 0.063 seconds, 12 queries executed - Memory usage: 1.56 MiB (Peak: 1.73 MiB) ]