Page 1 of 7 123 ... LastLast
Results 1 to 10 of 62
Like Tree6Likes

Thread: Well okay Foraging is bad.

  1. #1
    Senior Member
    TheRigger is offline

    Posts
    641

    Well okay Foraging is bad.

    GUI (Has been changed, slightly):


    Current features:

    Depth four in 0.5 or less seconds!
    Optimized and limited search!
    Multithreaded!
    Performs decently with stuff on the board!
    Gets Fren! (Edit: not anymore? )
    Uses shovels and machetes!
    Does left and right clicks!
    Allows for human intervention when it can't figure stuff out!


    With human aid on depth 4, scored Frenetic 4 times in a row (out of 4).
    Attached Thumbnails Attached Thumbnails suchwow.png  
    Last edited by TheRigger; 05-20-2014 at 03:59 AM.

  2. #2
    Senior Member
    WatchMeWin is offline

    Posts
    854
    Let me know your Algo for this? Basic idea of how to clear crates that is. May be able to help you adapt to regular forage.
    new life, who this

  3. #3
    Senior Member
    TheRigger is offline

    Posts
    641
    No, it's all a heuristic.
    It's also incredibly frustrating...
    Basically I'm not willing to do the complicated image detection necessary for normal foraging, even though the heuristic might work.
    Edit: hey look, turned out I wasn't zeroing things out after I was done with them...
    lol.
    Last edited by TheRigger; 05-13-2014 at 07:28 AM.

  4. #4
    Senior Member
    TheRigger is offline

    Posts
    641
    And now...
    Let me present!
    Failure!
    lol I tried out the bot but it performed especially terribly in CI. I was wondering what was up with that, so I looked into it further.
    Turns out I was running it at depth one.
    >.<
    I'm so stupid.

  5. #5
    Member
    savagesun is offline

    Posts
    72
    Nice! What kind of milliseconds does it take for you to get depth 3 completed at max? Mine is something like 800ms.

  6. #6
    Senior Member
    TheRigger is offline

    Posts
    641
    Okay bit slower now but theoretically (aka I checked it in my simulator) smarter.
    So 2000 ms.
    Also HMM.
    Last edited by TheRigger; 05-15-2014 at 05:37 AM.

  7. #7
    Senior Member
    TheRigger is offline

    Posts
    641
    Ewww.
    Even with huge pruning, the depth 5 ranges from 1-45 seconds.
    That's a HUGE range, and I don't really know why, so lol.
    With depth 4 the max is 6-ish seconds, so yes you should be impressed.



    Also about this:
    Quote Originally Posted by savagesun View Post
    unless you recorded every pixel value in the board's background which sounds like more work than it's worth haha
    I literally just copied the background picture, saved it in the folder, and read it in once.
    All the work got done right there.
    Last edited by TheRigger; 05-17-2014 at 07:33 PM.

  8. #8
    #Return
    Scarecrow is offline

    Posts
    3,443
    Yes because brute-force is always the answer... (sarcasm)

    6 seconds a move isn't "impressive" you're better off keeping it 3 depth and using a pathfinding algorithm to get the necessary pieces to clear chests.

    e.g. Get all the positions of the green pieces if you need one to clear a chests, calculate which one is closest and then move it towards the other pieces. Once it's there, then brute force it to clear.
    savagesun likes this.

  9. #9
    Senior Member
    TheRigger is offline

    Posts
    641
    Quote Originally Posted by Scarecrow View Post
    Yes because brute-force is always the answer... (sarcasm)

    6 seconds a move isn't "impressive" you're better off keeping it 3 depth and using a pathfinding algorithm to get the necessary pieces to clear chests.

    e.g. Get all the positions of the green pieces if you need one to clear a chests, calculate which one is closest and then move it towards the other pieces. Once it's there, then brute force it to clear.
    The problem with that is that you might have to navigate hugely complicated loops to get that one to get to the right place without accidentally clearing pieces, which could lead to getting a chest stuck, although it might be simpler in some cases and more difficult in others.
    Anyways, I'd say the general tendency was 1 second, not 6. That board, for some odd reason, gives the bot difficulty. Also figuring out when you need extra pieces and when you don't and where you need them (if you need 2, which isn't that rare) in relation to each other isn't that easy.
    Also I can probably cut the number down since I didn't set the lower bound, only the upper bound.
    Edit:
    Jeez adding a lower bound tripled the speed of depth 5 and depth 4.
    I'm pretty sure that 2 seconds is basically acceptable for depth 4.
    I'd consider further pruning and getting it to depth 6/7, but then it wouldn't be able to find reasonable paths in 7 clicks, since the possible clicks from one to the next would be too limited and might hit dead ends.
    The reason I considered pruning and bruteforce was because it theoretically acted like a pathfinder that looked n moves ahead. In addition, it allowed me to combine a heuristic for scoring a board, which would've been difficult to do with what you suggested (as far as I can see).
    Quote Originally Posted by Scarecrow View Post
    6 seconds a move isn't "impressive"
    It is when it was taking you 10 seconds before...
    and now 0.5 seconds, so 2000% improvement!
    And with a tiny (four nodes/level) bit more of trimming, it really isn't that bad, though it does have some significant trouble dealing with monkeys and earthquakes (not really sure why).
    So yeah. I think I clicked a little bit in the beginning, and some in the middle to hit a monkey/earthquake when it caused a problem:
    Depth 4:

    So yes, because brute-force is always the answer... (sarcasm)
    No, I'm just too lazy to write new code.
    Last edited by TheRigger; 06-09-2014 at 07:02 PM.

  10. #10
    Senior Member
    TheRigger is offline

    Posts
    641
    Brute force is ALWAYS the answer.
    lol and the bot screwed up this round I think...
    I have some improving to do.
    But still,
    Brute Force Is ALWAYS The Answer.

    Anyways, if I made it faster it might make OOO retaliate.

    Edit: Also I lied... apparently I count way faster than one second. Depth 4 is (for worst board) 468 milliseconds.

    (Also could a moderator+ please rename this thread to "Third Forage Bot"? Thanks!)
    Last edited by TheRigger; 05-18-2014 at 05:42 AM.

Page 1 of 7 123 ... LastLast

Posting Permissions

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