Page 5 of 5 FirstFirst ... 345
Results 101 to 125 of 125

Thread: The League of Scripters

  1. #101
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Sorry, just running a bit late.
    New challenge going up shortly - even though Ron didn't send in a pm (naughty Ron!), I'll accept his entry. Other two being nielsie and Dan Cardin. Results will go up a bit after I post the challenge.
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  2. #102
    Join Date
    Apr 2006
    Location
    I live in NH
    Posts
    611
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Sweeet thx mixster for accepting it but it's not completed tho.

    Hello nielsie.
    DFM Form Parser - SCAR Obfuscator - Master Keylogger - RuneScape Stats Grabber - Index Cards

  3. #103
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    with Nielsie's
    s := ['say lol 1', 'h^ehehe', 's.ay ONE two three', 'say lol', 'say heho! (not!)', 'Hey', 'Hello', 'Hai', 'Hoi ', 'hello', 'hEY', 'hello', 'Hoi', '.lo l123', '.lol ', '.lol.', '.lolA', '.lola', '.567', '567', '0123', '...lol', 'bye', 'cya', 'zebra', 'ZONK!'];
    gives an out of range error, and with the input you gave, it outputs this
    ...lol
    .567
    .lo l123
    .lol
    .lol.
    .lola
    .lolA
    0123
    567
    bye
    cya
    h^ehehe
    Hai
    hello
    hello
    Hello
    hEY
    Hey
    Hoi
    Hoi
    s.ay ONE two three
    say heho! (not!)
    say lol
    say lol 1
    zebra
    ZONK!
    where, afaik Hello shouldnt be before hello. Anyways. Mine was far from perfect, and much less so than yours Nielsie . And Mixster is a cheat if he wont count my very very slight error in putting my setting result lines backwards yet allows Ron to enter.

    ANYWAYS. Questions on the new one. Firstly, we are in simple terms doing this - [*]finding the longest path and that one is Jack's[*]telling you how long it is.[*]finding how many other different ways there are (jill)
    is that correct?

    Aswell as, you're going to need to give an example of the map you'll be giving. I'd rather have a map that looks like (i actually dont like that either, but i dont like your format. as 1 there is no way in and out of the maze, 2 i think it would be funner if the entrance and exit would have to be found rather than you give them, 3 i dont want to parse like your example wants me to).
    Code:
    XXXXXXXXXXXXXX XXXXXXXX
    X  X  X XXXXX  XX    XX
    XXXXXXXXXXXXXX   XXXXXX
    XXXXXXXXXX       XXXXXX
    XXXXXXX    XXXXXXXXXXXX
    XXXXXXX            XXXX
    XXXXXXXXXXXXXXXXX  XXXX
    XXXXXX X     X     X  X
    XXXXXXXXXXXXXXXXX XXXXX
    EDIT...type that into SCAR from the actual text and it will look right...


    your map looks much different from mine. So i'll need a specific format that you'll be putting your map in.
    Last edited by Dan Cardin; 10-11-2009 at 12:56 AM.
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  4. #104
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    Hey, you're right, there was still a bug in there . About the hello-Hello: Mixster said "With case insensitivty, hello = HELLO.", so that shouldn't matter.

    If anyone is still interested in the fixed version, I attached it.

  5. #105
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Dan Cardin View Post
    with Nielsie's
    gives an out of range error, and with the input you gave, it outputs this
    where, afaik Hello shouldnt be before hello. Anyways. Mine was far from perfect, and much less so than yours Nielsie . And mixster is a cheat if he wont count my very very slight error in putting my setting result lines backwards yet allows Ron to enter.
    I still did let you enter - I just didn't let you make me alter your script after you entered it. I even double checked with you that it worked, to which you said yes! I tested each with the input used in the script. nielsie's was the only one which actually did what it was supposed to given the input - it didn't occur to me that giving it different input may crash it, especially after no one elses worked!

    ANYWAYS. Questions on the new one. Firstly, we are in simple terms doing this - [*]finding the longest path and that one is Jack's[*]telling you how long it is.[*]finding how many other different ways there are (jill)
    is that correct?
    In a nutshell, yes.

    Aswell as, you're going to need to give an example of the map you'll be giving. I'd rather have a map that looks like (i actually dont like that either, but i dont like your format. as 1 there is no way in and out of the maze, 2 i think it would be funner if the entrance and exit would have to be found rather than you give them, 3 i dont want to parse like your example wants me to).
    EDIT...type that into SCAR from the actual text and it will look right...

    your map looks much different from mine. So i'll need a specific format that you'll be putting your map in.
    I will have my map as an array of Boolean / TBooleanArray. False for unwalkable, true for walkable. The starting position and finishing position will be input into the function as a TPoint with the y refering to bool[y] and x refering to bool[y][x].

    Quote Originally Posted by nielsie95 View Post
    Hey, you're right, there was still a bug in there . About the hello-Hello: mixster said "With case insensitivty, hello = HELLO.", so that shouldn't matter.

    If anyone is still interested in the fixed version, I attached it.
    Indeed - case insensitivity means Hello = hello.
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  6. #106
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    woops! i hadnt seen the case insensitivity enabled!

    And OH @ the start and end positions! I figured it was more of a enter and exit the maze sort of deal where there would just be an opening on 2 sides and those would be the places.
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  7. #107
    Join Date
    Apr 2006
    Location
    I live in NH
    Posts
    611
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    @Dan, hahaha. I wasn't even trying to submit. I was bored and just did that to pass the time and figured I'd post it. If you didn't notice, I received none of mixster's precious points. :P

    For the map, you do not need a 2 to show it's the end of the line. You can use a TStringList to load the maze file and interpret each number line by line.

    We did something like this in my java class and instead of using so many numbers, we only used 0s and 1s. It brought up a jpanel and would draw the entire map out including the person walking through the maze. Then it would have the person go through and figure out the maze by trying each path and if/when it ended, it would double back and pick a new path until it got to the end of the maze. That was a fun program to write.
    DFM Form Parser - SCAR Obfuscator - Master Keylogger - RuneScape Stats Grabber - Index Cards

  8. #108
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    You still need the 2's as Scar can't read strings over multiple lines - you could remove then save as a file and use #13 and #10 to explode by
    A parser for it would literally be <10 lines though, so I don't think it should be much of an issue, especially as it isn't a requirement for the challenge.
    semi-pseudocode being:
    Code:
    arr := explode maze, 2;
    for y in each of arr do
      for x in each of arr[y] do
        if arr[y][x] is 0, then set bool2Darr[y][x] to false else set to true
        if arr[y][x] is 3 set begin, if 4 set finish
    This also differs from a traditional maze though as it has multiple paths, so you have a few different ways to try

    Edit: bah, add code so it indents...
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  9. #109
    Join Date
    Apr 2006
    Location
    I live in NH
    Posts
    611
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Im not sure if you understood what I wrote, so I'll just show the code to prove it. This is very standard code so i wouldn't be surprised to see something similar in someone's submission.

    Code:
    program RonIYF;
    
    var
      browse : TOpenDialog;
    
    procedure parse( fileName : String );
    var
      a : TStringList;
      row, col, numRow, numCol : Integer;
      line : String;
    begin
      a := TStringList.Create;
      if (LoadFromFile(a, fileName)) then
      begin
        numRow := a.Count;
        for row := 0 to numRow - 1 do
        begin
          AddToReport('row ' + IntToStr(row));
          numCol := length(a[ row ]);
          AddToReport('start numCol = ' + IntToStr(numCol));
          line := '';
          for col := 1 to numCol do
          begin
            case a[ row ][ col ] of
              '0' : line := line + ' ';
              '1' : line := line + '|';
              else
                AddToReport(a[ row ][ col ] + ', not allowed.');
            end;
            ReplaceDebugLine(row, line);
            Wait(10);
          end;
          WriteLn(' ');
        end;
      end;
      a.Free;
    end;
    
    begin
      ClearDebug;
      ClearReport;
      ChangeReportWidth(200);
      browse := TOpenDialog.Create(nil);
      browse.Filter := 'All Files|*.*';
      if ( browse.Execute ) then
        parse( browse.FileName )
      else
        WriteLn('select a file.');
      browse.Free;
    end.
    Use this file:
    Code:
    111111111111111111111111111111
    110000011110000111001111111101
    101111101101111011000111111101
    101111101101111011010011111101
    101111101101111011011001111101
    101111011101111011011100111101
    100000111101111011011110011101
    101101111101111011011111001101
    101110111101111011011111100101
    101111011101111011011111110001
    101111101110000111011111111001
    111111111111111111111111111111
    It loads the file, reads it line by line without having to check the last letter, and displays the result by replacing 0's with spaces and 1's with vertical bars.
    DFM Form Parser - SCAR Obfuscator - Master Keylogger - RuneScape Stats Grabber - Index Cards

  10. #110
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    bah, you know I love you Ron, but I don't think you're reading the challenge!
    The problem is basically to create a maze solving algorithm, not a parser. Also, you are supposed to PM your entry to me rather than post in the topic so that there should be no doubt that one entry wasn't copied etc
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  11. #111
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Quote Originally Posted by mixster View Post
    bah, you know I love you Ron, but I don't think you're reading the challenge!
    The problem is basically to create a maze solving algorithm, not a parser. Also, you are supposed to PM your entry to me rather than post in the topic so that there should be no doubt that one entry wasn't copied etc
    He was just showing that it's possible to make a parser without having to use the "2" at the end of each line.

  12. #112
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    But I didn't doubt that it was possible - I just said that it would pretty much be the same amount of code and doesn't really make much of a difference at all since I'll be parsing the map myself and the submission itself doesn't have to

    I see your point and retract my earlier statement though
    Last edited by mixster; 10-12-2009 at 09:38 AM.
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  13. #113
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    Is the maze always a rectangle?

  14. #114
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Yes - it will always be rectangular, probably not square.

    Also, one more week for entries! Don't forget and it's not too late to start!
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  15. #115
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    will it always have walls surrounding it?
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  16. #116
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Erm, yes.
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  17. #117
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    No more entries to be accepted!
    This time I got one entrant, so nielsie will probably win unless he was silly enough to submit a non-functioning script. On a similar note, I think if there is only one entrant next week, then I'll end this LoS and try again at a different time.

    In the mean time, expect the new challenge to be posted up later tonight!
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  18. #118
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    ill entrance mine when i finish it. I got lazy and forgot about it half way through the week. Not to want to get points, but i want to finish it nonetheless.
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  19. #119
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by mixster View Post
    No more entries to be accepted!
    This time I got one entrant, so nielsie will probably win unless he was silly enough to submit a non-functioning script. On a similar note, I think if there is only one entrant next week, then I'll end this LoS and try again at a different time.
    I think the issue is, people just want something small, like the first challenge. Something that's easy to make, but takes skill to make fast. Like a sorting algorithm or something.

  20. #120
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    That's what I was thinking, but it's hard to think of small problems since they usually have perfect algorithms produced to solve them already
    Going to spend the next couple of hours going over ideas and the like then I'll post it up.
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  21. #121
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Ok, problem 5 is up and it tells a great tale - RuneScape has been updated and uptext is no longer detectable! Help the two fictional heroes once more allow uptext collection to work by creating either a uptext filterer that takes a bitmap of uptext and returns a TPA of all text points. Alternatively, create a TPA "filler" that takes a TPA of an outline and fills it in to return a "full" TPA!
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  22. #122
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    gah silly rs-ish things.
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  23. #123
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    RS orientated, but by no means RS specific
    Problem B is most definitely possible for usage outside of RS silly
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  24. #124
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    aha! I didnt read part B because it started
    Ok, so the scene continues from Problem A
    I am quite sorry at my silly response.
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  25. #125
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    Might join, if I find some time this week
    Verrekte Koekwous

Page 5 of 5 FirstFirst ... 345

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •