SRL Archive - News and General

Mining Competition Results


pwnaz0r

2007-10-11 01:37:13

Ben Land


Creativity (20 / 25)
Didn't see anything way out of the ordinary. Used HSL so that adds some points. He did create a plugin, I didn't really count that in technique but I think it should make up somewhere.

Professional(15 / 15)
Parameters were kept general. Properly creditted, Good job.

Technique (25 / 30)
Used great functions in source of FindColorsHSLFast( sorry guys, no source for you ;) ).

Standards (15 / 15)
30% of the length of his procedure was commenting (more than a paragraph of commenting. Then commenting on every line. He also used the SRL Commenting… thing :).

Requirements (40 / 50)
Average was around 60ms. Thats really why I took 10 points off. (I saw somewhere where you said 4ms :p?).

115 / 135

[ATTACH]7477[/ATTACH] - Bens Plugin(Crazy Fast)

{*******************************************************************************
procedure FindRocks(var Points: TPointArray; RockType: Integer);
by: BenLand100
Description: Finds rocks in Varrock using HSL
Returns midpoints of rocks found in the Points array
Use the following values for RockType:
0 - Copper
1 - Tin
2 - Iron
3 - Silver
4 - Clay
*******************************************************************************}
procedure FindRocks(var Points: TPointArray; RockType: Integer);
var
Temp: TPointArray;
Len, Count, i, e: Integer;
begin
SetLength(Points,169830);
case RockType of
{Copper} 0: Len:= FindColorsHSLFast(GetClientCanvas.handle,5,5,515,338,Points,169830,28,50,50,5,20,30);
{Tin} 1: Len:= FindColorsHSLFast(GetClientCanvas.handle,5,5,515,338,Points,169830,2,10,50,7,20,30);
{Iron} 2: Len:= FindColorsHSLFast(GetClientCanvas.handle,5,5,515,338,Points,169830,17,50,30,2,20,20);
{Silver} 3: Len:= FindColorsHSLFast(GetClientCanvas.handle,5,5,515,338,Points,169830,43,18,60,5,10,40);
{Clay} 4: Len:= FindColorsHSLFast(GetClientCanvas.handle,5,5,515,338,Points,169830,40,55,70,2,20,20);
end;
Len:= GroupCentersMin(Points,Len,30,10);
SetLength(Temp,1600);
i:= 0;
e:= Len - 1;
{The FindColorsHSLFast in the following section identifies the rock color
that is the lightest color on the rock for Varrock rocks. It could be
adjusted to work for other new rocks by putting in the HSL values for the
rocks of the new area.}
//Simplified Excluding Quicksort Algorithm
while i < Len do
begin
repeat
Count:= FindColorsHSLFast(GetClientCanvas.handle,Points[e].X-15,Points[e].Y-15,Points[e].X+15,Points[e].Y+15,Temp,1600,45,75,40,12,20,20);
e:= e - 1;
Len:= Len - 1;
until ((Count >= 150) and (Count <= 700)) or (e < 0);
Len:= Len + 1;
e:= e + 1;
repeat
Count:= FindColorsHSLFast(GetClientCanvas.handle,Points[i].X-15,Points[i].Y-15,Points[i].X+15,Points[i].Y+15,Temp,1600,45,75,40,12,20,20);
i:= i + 1;
until ((Count < 150) or (Count > 700)) or (i - 1 > e);
i:= i - 1;
if i >= e then break;
Points[i]:= Points[e];
Len:= Len - 1;
end;
SetLength(Temp,0);
SetLength(Points,Len);
end;


SKy Scripter


Creativity (22 / 25)
He submitted alot of functions. He also used Length and Width. I liked it. I think he deserves it because he did put some effort into it.

Professional(15 / 15)
His plugin looked really nice. He included source. He did comment.

Technique (25 / 30)
The technique was standard. As he said himself

// OK! i had a really bad start on this, I Didnt have enought time
// to make it detect all the rock colors using HSL or RGB
// so i just have colors placed in here. Also it should do bad
// Because it uses Object Searching. With the height, width and ect.


Standards (13 / 15)
Correctly commented. It was fine. Didn't really comment on the procedures though

Requirements (30 / 50)
Didn't really work all that great. Worked pretty well though ;)

105 / 135
[ATTACH]7478[/ATTACH] - Sky Plugin and script

N3ss3s


Creativity (25 / 25)
Submitted three functions. One used HSL, one used finding in bitmaps, all used Wizzy plugin. Exactly what I looked for, different styles, great job! The bitmap one was the fastest.

Professional(15 / 15)
Commented all procedure. Good job.

Technique (20 / 30)
Mostly because of the bitmap one. Good job.


Standards (10 / 15)
Standards are… different. Anyways, you didn't use the SRL Commenting thing etheir.

Requirements (35 / 50)
Im going to have to score you about the same as SKy, probably because even though one of your procedures didn't really work (HSL one), it was still a good idea.

105 / 135

 
Function FindRock(All: Boolean; var RockTPA: TPointArray; Color: Integer): Boolean;
Var
I, D, C, B, X, Y, A, Z, M, N: Integer;
Var
TPA: TPointArray;
Begin
A := GetClientWindowHandle;
B := GetSystemTime;
C := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
I := BitmapFromString(762, 502, '');
CopyClientToBitmap(i, 0, 0, 762, 502);
SetTargetBitmap(i);
FindColorsTolerance(TPA, Color, MSX1, MSY1, MSX2 - 5, MSY2 + 5, 0);
Z := GetArrayLength(TPA);
If(Not(Z <= 0))Then
Begin
For D := 0 To Z - 1 Do
Begin
FastSetPixel(i, TPA[d].x, TPA[d].y, 255);
End;
X := MSX2;
Y := MSY2;
If(Not(All))Then
Begin
If(FindColorSpiral2(X, Y, 255, MSX1, MSY1, MSX2, MSY2))Then
Begin
Result := True;
FindColorsTolerance(TPA, 255, X - 15, Y - 15, X + 15, Y + 15, 0);
SetArrayLength(RockTPA, 1);
RockTPA[0] := MiddleTPA(TPA);
End;
End Else
Begin
FindColorsSpiralTolerance(MSCX, MSCY, RockTPA, 255, MSX1, MSY1, MSX2, MSY2, 0);
If(GetArrayLength(TPA) > 0)Then
Begin
Result := True;
End;
End;
End;
FreeBitmap(i);
SetClientWindowHandle(A);
ColorToleranceSpeed(C);
M := GetSystemTime;
N := M - B;
Writeln(IntToStr(N));
End;



So congrats to Ben! if ben gives me permission, I will post the procedures and the plugin. Hopefully, the next competition that is hosted will have more people entering.

n3ss3s

2007-10-11 07:10:30

Good job ben!

Hehe, me and SKy were only 10 points away fro ya ;)

Im glad I was "in the competition", not like 70/135 :D

And thanks pwnaz0r for the grading and all your effort!

GoF

2007-10-11 07:45:49

I cant see the procedures? Or will they be posted? (other than ben, as you only asked if ben allows you to post his)

Santa_Clause

2007-10-11 07:47:57

Whoa…not bad. Good job all, but the winner is pwnaz0r for even making the competition :)

n3ss3s

2007-10-11 08:00:37

Mine will appear in my coal miner when I finish and release it ;)

Bobarkinator

2007-10-11 08:20:43

Good job Ben!!…and everyone else :p

pwnaz0r

2007-10-11 13:27:59

From: n3ss3s
Mine will appear in my coal miner when I finish and release it ;)


Use the Bitmap one. And I can show you n3ss3s but SKy's is also a plugin.

n3ss3s

2007-10-11 13:36:45

Use the Bitmap one.


Yup, thats the one Im speaking all the time ;)

The HSL one is just disgusting xD

BenLand100

2007-10-11 14:51:40

From: pwnaz0r

Creativity (20 / 25)
Didn't see anything way out of the ordinary. Used HSL so that adds some points. He did create a plugin, I didn't really count that in technique but I think it should make up somewhere.

So congrats to Ben! if ben gives me permission, I will post the procedures and the plugin. Hopefully, the next competition that is hosted will have more people entering.


Its not like I wrote the fastest HSL finder in existance or anything, which allowed me to do an individual HSL search for each rock to determin if it was in fact a rock :garfield: You can release mine, it might make Sky happy anyway ;)

Edit: I'm pretty sure that I never said the one I entered was 4ms, that was another one that I didn't enter cause it wasen't very accurate. I specificaly said it was 60ms for sure ;) Also, 60ms for HSL is pretty damn fast :p By the way, I was the one that standardized comments in SRL to work with the manual generator that I wrote for SRL :)

_ChArMz

2007-10-11 15:03:45

Lets see some code :D

Ruroken

2007-10-11 15:28:32

Woah, _ChArMz is back? :O

the scar noob

2007-10-11 15:34:32

From: _ChArMz
Lets see some code :D


Indeed, I wanne see it all! :D
Let us all thanks pwnaz0r to start this competition! Without him there just wasn't one!
Thanks pwnaz0r!

-Tsn.

shaunthasheep

2007-10-11 15:59:14

Yes, undress that plugin so we can see what is underneath those sexy clothes. :eek:

Special Ed

2007-10-11 16:25:29

I dare you to have a FishFinder for the next one… lol :D Although I think you know what is going to happen next [Get on MSN?]

Either way congrats everyone I thought all of the functions I saw where pretty impressive and I hope to see some more from you folks in the future!

bullzeye95

2007-10-11 16:49:51

Don't have a treefinder next. Lorax will pwn everybody!

Congratz Ben. I wanna see some code pl0x

R0b0t1

2007-10-11 16:51:16

Yes… PwNaZ0r, post Ben's stuff.

Soz, I forgot to PM you. I was going to join with those functions I made in the other thread :p. Although, when I saw Ben was joining… v.v turned to V.V

Bobarkinator

2007-10-11 21:00:00

Ya, I've had Ben's plugin for about a week and it is very sexy. It's simply amazing. I want to see what's in SKy's plugin though.