Page 1 of 2 12 LastLast
Results 1 to 10 of 18
Like Tree2Likes

Thread: Second Forage Bot

  1. #1
    Banned
    Telnet is offline

    Posts
    16

    Second Forage Bot

    I started work on a forage bot around 2 days ago. Funnily the next day someone posted that they also have one in the making. Reading his post, it looks like they are coded very differently. I am obviously no where near the progress he has made however I only started this a few days ago. I made a small video to show what stage I am up to at the moment. It doesn't detected boxes yet as I am still coding the algorithm to work out how to create clears. I'm currently getting near a stage where the bot would be able to continuously play the puzzle if no boxes were to come. I'm really happy with the progress at the moment in such a short period of time and I have some really good idea on how to get this fully functional.

    This video is 100% automatic. I did not touch any keys or the mouse.

    Gauge and Logo like this.

  2. #2
    #Return
    Scarecrow is offline

    Posts
    3,443
    Not a bad start.

    Just remember the whole focus of this game is to clear the boxes

  3. #3
    Banned
    Telnet is offline

    Posts
    16
    Yeah I know :P. Obviously I need to add the part where the bot detected that boxes are present and then find the best possible way to clear it. Might start work on that tonight if I get bored.

  4. #4
    Senior Member
    TheRigger is offline

    Posts
    641
    One way of doing it:
    Add weights. Give extra weightage to clears on the outside of the board, and give extra weightage to pieces under chests.
    Basically keep track of the spaces under chests.
    And have an array like this:
    [50][10][5][1][5][10][50]
    Multiply the score of each piece by the column's score by the multiplier (pretty big) if there's a chest in that column.

    No, not perfect.
    But pretty [edit: bad, lol I changed the heuristic].

    The one odd case is when you have a giant crate in the exact middle, in which case you get left with an empty column in the middle. In that case dismiss? Not really that easy to fix compared to things like detection.
    Last edited by TheRigger; 05-19-2014 at 11:32 PM.

  5. #5
    Senior Member
    Logo is offline

    Posts
    413
    Dibs on getting this bot free first again.
    Calm the sig size

  6. #6
    Member
    savagesun is offline

    Posts
    72
    Hey nice haha! Watch out when detecting the crates, the shiny stars it emits do mess with the colors. I'm still not 100% sure it's an issue but it does seem like it might cause some issues with recalculations. If the bot can't find the crate it was acting on previously mine sort of donks out when there are multiple answers on the board.

  7. #7
    Banned
    Telnet is offline

    Posts
    16
    I'm actually not detecting crates. They're are defined as a non detection. I just made it so that is the detection didn't match any of the recorded RGB's then it would conclude that it must be a crate.

  8. #8
    Member
    savagesun is offline

    Posts
    72
    That doesn't sound like a good idea.. what happens when there are empty spaces? It would treat them as a crate wouldn't it? Also turns out the recalculation was my algorithm so it's not much of an issue heh

    Edit: unless you recorded every pixel value in the board's background which sounds like more work than it's worth haha

  9. #9
    Senior Member
    TheRigger is offline

    Posts
    641
    Or you could just find the pixel value for the top left corner of a crate and set all the others corresponding to it that way...
    lol that's what I'm doing.
    So yeah I'm working on a forage bot too.
    But for me it's much easier since I have the Aethyr framework to work with, and some things are/can be the same for many bots.

  10. #10
    Banned
    Telnet is offline

    Posts
    16
    I want them to detect empty spaces as crates though. When I say crate, the program is programed to treat them as non moveable objects that are required to get to the bottom of the screen. A space can only form under an existing crate so it has no relevance.

Page 1 of 2 12 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
  •