Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » [ATC#3] So you say you're a "hacker"? Prove it!
- IcyCoder
- Scratcher
1000+ posts
[ATC#3] So you say you're a "hacker"? Prove it!
Let's Play: Figure Out How STINGER works without seeing it in person/seeing the code!
So what we know already:
- Really High Scorer
- It is protected well
- There is some spots in the code that is weak
What we can assume by that:
- Small Code or a lot of IF statements and SET EXECUTION_POINTERs or a mixture of both
- It has some method that protects it from getting TAGed most of the time without taking too much code/time
How can we (I mean I) make a bot to beat STINGER?
- A bot that is small so it can do more so it can get more points
- Creating a fully protected bot that does not take too much code/time
And yes I have a untested prototype that I am working on to do this you are welcome.
Edit: Please play along
So what we know already:
- Really High Scorer
- It is protected well
- There is some spots in the code that is weak
What we can assume by that:
- Small Code or a lot of IF statements and SET EXECUTION_POINTERs or a mixture of both
- It has some method that protects it from getting TAGed most of the time without taking too much code/time
How can we (I mean I) make a bot to beat STINGER?
- A bot that is small so it can do more so it can get more points
- Creating a fully protected bot that does not take too much code/time
And yes I have a untested prototype that I am working on to do this you are welcome.
Edit: Please play along
Last edited by IcyCoder (July 14, 2016 13:10:09)
Because JS is the future (echos) future future futur futu fut fu f
- IcyCoder
- Scratcher
1000+ posts
[ATC#3] So you say you're a "hacker"? Prove it!
IcyFireBot coming soon:
I changed one thing and look at it now:
Still Working on beating Snipar!
I changed one thing and look at it now:
Still Working on beating Snipar!
Last edited by IcyCoder (July 14, 2016 13:27:16)
Because JS is the future (echos) future future futur futu fut fu f
- goldfish678
- Scratcher
1000+ posts
[ATC#3] So you say you're a "hacker"? Prove it!
2hax4me
Seriously though, I have no experience to do this kind of thing
Seriously though, I have no experience to do this kind of thing
- MegaApuTurkUltra
- Scratcher
1000+ posts
[ATC#3] So you say you're a "hacker"? Prove it!
I'll note that it's not really fair to show bots off and not actually submit the code. It's no fun when you don't know what weaknesses to exploit.
$(".box-head")[0].textContent = "committing AT crimes since $whenever"
- MegaApuTurkUltra
- Scratcher
1000+ posts
[ATC#3] So you say you're a "hacker"? Prove it!
Just put something together quickly and try it 2hax4me
Seriously though, I have no experience to do this kind of thing
You never know how well a bot will actually do
$(".box-head")[0].textContent = "committing AT crimes since $whenever"
- IcyCoder
- Scratcher
1000+ posts
[ATC#3] So you say you're a "hacker"? Prove it!
OK when I am done my testing/fixing I will release the code I'll note that it's not really fair to show bots off and not actually submit the code. It's no fun when you don't know what weaknesses to exploit.
Because JS is the future (echos) future future futur futu fut fu f
- IcyCoder
- Scratcher
1000+ posts
[ATC#3] So you say you're a "hacker"? Prove it!
Submission: IcyFireBot
Credit: @jokebookservice1 for line 4
PROTECT EXECUTION_POINTER
SET DIRECTION RANDOM
MOVE
PROTECT @RANDOM%7+1
SET *@RANDOM @6
TAG IcyFireBot
SET EXECUTION_POINTER 1
Credit: @jokebookservice1 for line 4
Because JS is the future (echos) future future futur futu fut fu f
- TheMonsterOfTheDeep
- Scratcher
1000+ posts
[ATC#3] So you say you're a "hacker"? Prove it!
IcyFireBot coming soon:Wow I didn't know Snipar could win in a giant brawl!
I changed one thing and look at it now:
Still Working on beating Snipar!
Right now its main weakness is that it doesn't protect EXECUTION_POINTER so a bot can write malicious code to its unprotected section and then set it's execution pointer to execute it. I'm going to fix this flaw at somepoint.
my latest extension: 2d vector math
- CodeLegend
- Scratcher
500+ posts
[ATC#3] So you say you're a "hacker"? Prove it!
It uses all 32 lines. Small Code
2 IFs, 5 SET EXECUTION_POINTERs. a lot of IF statements and SET EXECUTION_POINTERs or a mixture of both
15 PROTECTs It has some method that protects it from getting TAGed most of the time without taking too much code/time
YOU CAN'T. How can we (I mean I) make a bot to beat STINGER?MUAHAHAHAHAHA
- TheMonsterOfTheDeep
- Scratcher
1000+ posts
[ATC#3] So you say you're a "hacker"? Prove it!
@MATU did you see the problem I'm having with the controller?
my latest extension: 2d vector math
- CodeLegend
- Scratcher
500+ posts
[ATC#3] So you say you're a "hacker"? Prove it!
STINGER beat Snipar 1v1 119 to 1.
Against the second, STINGER won 1v1 63 to 9.
With some other bots present (using the first quoted RunRunProtect):
Other than possibly SPAMela, I think Snipar has the best chances against STINGER, at least in group scenarios.
Against the first, STINGER won 1v1 25 to 6. Could you try:
PROTECT EXECUTION_POINTER
MOVE
IF *EXECUTION_POINTER EQUALS -1 1 4
SET *@RANDOM @8
PROTECT @(RANDOM%8+1)
PROTECT @RANDOM
SET EXECUTION_POINTER 1
TAG RunRunProtect
and have another go with the similar
PROTECT EXECUTION_POINTER
MOVE
IF *EXECUTION_POINTER EQUALS -1 1 4
SET *@RANDOM @8
PROTECT @(RANDOM%8+1)
SET @(RANDOM%24+9) @8
SET EXECUTION_POINTER 1
TAG RunRunProtect
Against the second, STINGER won 1v1 63 to 9.
With some other bots present (using the first quoted RunRunProtect):
Other than possibly SPAMela, I think Snipar has the best chances against STINGER, at least in group scenarios.
- jokebookservice1
- Scratcher
1000+ posts
[ATC#3] So you say you're a "hacker"? Prove it!
Well I think mine needs to do more protecting
And way more attacking
And a bit of changing direction
And way more attacking
And a bit of changing direction
- TheMonsterOfTheDeep
- Scratcher
1000+ posts
[ATC#3] So you say you're a "hacker"? Prove it!
I'm honestly not surprised. STINGER beat Snipar 1v1 119 to 1.
my latest extension: 2d vector math
- CodeLegend
- Scratcher
500+ posts
[ATC#3] So you say you're a "hacker"? Prove it!
Well it's just not really made for a one-on-one… It has come very close to beating me, though. It's usually higher in points for the first 2000-3000 turns.I'm honestly not surprised. STINGER beat Snipar 1v1 119 to 1.
- IcyCoder
- Scratcher
1000+ posts
[ATC#3] So you say you're a "hacker"? Prove it!
Mine needs more protecting and more offense
Because JS is the future (echos) future future futur futu fut fu f
- IcyCoder
- Scratcher
1000+ posts
[ATC#3] So you say you're a "hacker"? Prove it!
@CodeLegend can you put STINGERs code up now
I'll note that it's not really fair to show bots off and not actually submit the code. It's no fun when you don't know what weaknesses to exploit.
Because JS is the future (echos) future future futur futu fut fu f
- gtoal
- Scratcher
1000+ posts
[ATC#3] So you say you're a "hacker"? Prove it!
META-suggestion for the next ATC (regardless of who sponsors it)
Can we
1) do it in Scratch?
and
2) do something whose solution is of long term benefit to the Scratch community?
For example (not a suggestion for the contest, just an example of the sort of thing I mean) solving TSP for max 300 points (cf https://scratch.mit.edu/projects/75405472/ ) - 300 chosen because it fits the clone limit.
There are lots of difficult problems that can find practical applications in games - N-body gravity, billiards, stuff for the NPR studio, …
G
Can we
1) do it in Scratch?
and
2) do something whose solution is of long term benefit to the Scratch community?
For example (not a suggestion for the contest, just an example of the sort of thing I mean) solving TSP for max 300 points (cf https://scratch.mit.edu/projects/75405472/ ) - 300 chosen because it fits the clone limit.
There are lots of difficult problems that can find practical applications in games - N-body gravity, billiards, stuff for the NPR studio, …
G
- IcyCoder
- Scratcher
1000+ posts
[ATC#3] So you say you're a "hacker"? Prove it!
I agree META-suggestion for the next ATC (regardless of who sponsors it)
Can we
1) do it in Scratch?
and
2) do something whose solution is of long term benefit to the Scratch community?
For example (not a suggestion for the contest, just an example of the sort of thing I mean) solving TSP for max 300 points (cf https://scratch.mit.edu/projects/75405472/ ) - 300 chosen because it fits the clone limit.
There are lots of difficult problems that can find practical applications in games - N-body gravity, billiards, stuff for the NPR studio, …
G
Because JS is the future (echos) future future futur futu fut fu f
- CodeLegend
- Scratcher
500+ posts
[ATC#3] So you say you're a "hacker"? Prove it!
Oh, alright… @CodeLegend can you put STINGERs code up now but only because you spelled it in all caps.I'll note that it's not really fair to show bots off and not actually submit the code. It's no fun when you don't know what weaknesses to exploit.
EDIT: Keep in mind that this is the original code. It wasn't designed to target any specific bot. Please don't specifically target mine.
Last edited by CodeLegend (July 14, 2016 19:35:36)
- CodeLegend
- Scratcher
500+ posts
[ATC#3] So you say you're a "hacker"? Prove it!
Submission: STINGER
Revision 1
Revision 2
PROTECT @32
PROTECT @31
PROTECT EXECUTION_POINTER
PROTECT @RANDOM
PROTECT @RANDOM
PROTECT @RANDOM
PROTECT @RANDOM
PROTECT @RANDOM
PROTECT @RANDOM
PROTECT @RANDOM
PROTECT @RANDOM
PROTECT @RANDOM
PROTECT @RANDOM
PROTECT @RANDOM
PROTECT @RANDOM
SET DIRECTION RANDOM
MOVE
SET DIRECTION RANDOM
MOVE
SET *@*EXECUTION_POINTER @31
SET *@*EXECUTION_POINTER @31
IF *DIRECTION EQUALS -1 28 24
SET EXECUTION_POINTER 24
SET DATA1 1
SET *@DATA1 @32
SET DATA1 DATA1+1
IF DATA1 GREATERTHAN 32 28 30
SET EXECUTION_POINTER 1
SET EXECUTION_POINTER 1
SET EXECUTION_POINTER 25
SET EXECUTION_POINTER EXECUTION_POINTER-1
TAG STINGER
Revision 1
PROTECT @32
PROTECT @31
PROTECT EXECUTION_POINTER
PROTECT @RANDOM
PROTECT @RANDOM
PROTECT @RANDOM
PROTECT @RANDOM
PROTECT @RANDOM
PROTECT @RANDOM
PROTECT @RANDOM
PROTECT @RANDOM
PROTECT @RANDOM
PROTECT @RANDOM
PROTECT @RANDOM
MOVE
SET DIRECTION RANDOM
MOVE
SET DIRECTION RANDOM
SET *EXECUTION_POINTER RANDOM
SET *@*EXECUTION_POINTER @31
SET *@*EXECUTION_POINTER @31
IF *DIRECTION EQUALS -1 28 24
SET EXECUTION_POINTER 24
SET DATA1 1
SET *@DATA1 @32
SET DATA1 DATA1+1
IF DATA1 GREATERTHAN 32 28 30
SET EXECUTION_POINTER 1
SET EXECUTION_POINTER 1
SET EXECUTION_POINTER 25
SET EXECUTION_POINTER EXECUTION_POINTER-1
TAG STINGER
Revision 2
PROTECT @32
PROTECT @31
PROTECT EXECUTION_POINTER
PROTECT @RANDOM
PROTECT @RANDOM
PROTECT @RANDOM
PROTECT @RANDOM%10+21
PROTECT @RANDOM%10+21
PROTECT @RANDOM
PROTECT @RANDOM
PROTECT @RANDOM%10+21
PROTECT @RANDOM%10+21
PROTECT @RANDOM
PROTECT @RANDOM
MOVE
SET DIRECTION RANDOM
MOVE
SET DIRECTION RANDOM
SET *EXECUTION_POINTER RANDOM
SET *@*EXECUTION_POINTER @31
SET *@*EXECUTION_POINTER @31
IF *DIRECTION EQUALS -1 28 23
SET EXECUTION_POINTER 24
SET DATA1 1
SET *@DATA1 @32
SET DATA1 DATA1+1
IF DATA1 GREATERTHAN 32 28 30
SET EXECUTION_POINTER 1
SET EXECUTION_POINTER 1
SET EXECUTION_POINTER 25
SET EXECUTION_POINTER EXECUTION_POINTER-1
TAG STINGER
Last edited by CodeLegend (July 14, 2016 20:32:57)