Page 1 of 4 123 ... LastLast
Results 1 to 10 of 37
Like Tree8Likes

Thread: OpenForager - The Free Open Source Foraging Bot

  1. #1
    Member
    savagesun is offline

    Posts
    72

    Lightbulb OpenForager - The Free Open Source Foraging Bot

    -Video to Come-




    Prelude
    Hi all! It's been a while. As some of you might remember, I once wrote a Foraging bot that attained Grand Master with a little human help. About a year after that, I tried my hand at it again. This time my goal was to create a bot that needed no human intervention, and that never got stuck. That proved to be a huge pain in the ass. It was easy to get to where I was before, but hard to get farther. After about 2 months of on and off working on the bot, my development really slowed down. Since then, I've found it very hard to continue work on it. Between my job and school I have very little time. I hate to see a project sink without ever seeing any good use. Thankfully, open source exists.

    Please expect updates to be mentioned in this thread and available on Github within the same day of announcement.




    What is OpenForage?
    OpenForage is an unfinished foraging bot written in C++ that is freely available for everyone, and it's open source! The bot is currently Windows only unfortunately. That said, here is a list of things the bot does currently:

    • Occasionally gets Incredibles and Excellents
    • Set up for human-like mouse movement
    • Stops HMM when user tries to move the mouse
    • Tries to use A* to solve
    • Selectively solves portions of the board


    You might notice that I mention mouse movement but don't actually state it has it. That is because I am leaving that up to the people who want to use the bot for their own purposes. The bot is entirely undetected using my own mouse movement, and I want to continue developing using that code. I also don't want a bunch of people complaining that they built the bot and got banned. This doesn't mean there is nothing useful involving HMM however. The class declaration is there for you to use.




    Goals of the Project
    The idea behind open sourcing this foraging bot is so that everyone has a chance to learn something. I remember trying to break into this type of work and finding a very steep initial learning curve. I hope that by having the source code available it will help inspire people to write their own fun AI in the future!

    The secondary goal behind this is for my own edification. There are a lot of really talented programmers on this forum and I know they can do a lot of what I do better than me. If these type of people ever find themselves bored, they are encouraged to branch the project and contribute!

    Contribution Rules
    I highly encourage everyone who wants to to contribute, but there are a few design practices we should all try to follow:
    • Unit test your methods
    • Try to avoid temporary variables
    • Document your work





    Immediate Improvements
    As mentioned this bot is not finished. Currently however, I want to focus on cleaning up the code available on the repository before starting to move closer to completion. Here are a few things I hope to add in the immediate future:
    • Rollback to a point where the bot was in a very stable condition. This includes re-structuring of tree data structure and removal of current A* methods
    • Documentation of functions
    • Commenting of code
    • Addition of Offline Foraging Puzzle for Bot Testing


    Now, for a few current communal goals people may want to work on:
    • Fixing A*. Current implementation does not work as expected and causes crashing.
    • Fixing threading. Current implementation runs slower than non-threaded method.





    How to Use
    The bot is freely available on Github. In order to contribute just branch the project and start committing to your own branch. If you have changes you want merged to the master project, you can contact me here.

    The bot can be downloaded from Github and built using Visual Studio. However, if you want it to work you'll have to put in a little elbow grease and either implement the HMM or take out the parts I left in. This is subject to change based on the reception of this project.





    Get it Here
    OpenForager




    **Note to moderators: since the bot is open source I'm unsure if I need it verified. As such, feel free to take down the link and let me know. Additionally, this is an entirely separate project to the last Foraging bot I wrote in Java, both in code and goal. Therefore, I felt it deserved a separate thread. Please let me know if this is also unacceptable.
    Last edited by savagesun; 11-15-2015 at 01:42 AM.
    pas likes this.

  2. #2
    Senior Member
    TheRigger is offline

    Posts
    607
    lol you code C++ as if it's Java
    love it <3
    erik likes this.
    Quote Originally Posted by TheRigger View Post
    In layman's terms: I'm dumb.

  3. #3
    Member
    savagesun is offline

    Posts
    72
    Really? Haha! How so?

  4. #4
    Senior Member
    TheRigger is offline

    Posts
    607
    Compare this C code to yours :
    https://github.com/jonls/td-minimax/...aster/tdgame.c
    Yours is more structured and the code organization for HMM and moves is similar to what I ended up with for many of my bots.
    Quote Originally Posted by TheRigger View Post
    In layman's terms: I'm dumb.

  5. #5
    A.K.A. Medals, Pleb God, Pika's biggest h8r, Based RNG
    Mehfailz x3 is offline

    Posts
    1,454
    Removed for further testing. Don't worry guys, Sticky will take a look at it.
    savagesun likes this.
    Who do you think you are?


    "Feel free to share this to people you like! Or to people you don't like. Just share it." -Face 2014


    Seventeenth on Emerald is selling PoE through Poker

  6. #6
    Senior Member
    TheRigger is offline

    Posts
    607
    Downloaded already :P
    <3
    Quote Originally Posted by TheRigger View Post
    In layman's terms: I'm dumb.

  7. #7
    A.K.A. Medals, Pleb God, Pika's biggest h8r, Based RNG
    Mehfailz x3 is offline

    Posts
    1,454
    Re-approved.

    You can repost your link.
    Last edited by Mehfailz x3; 11-14-2015 at 11:47 PM.
    Who do you think you are?


    "Feel free to share this to people you like! Or to people you don't like. Just share it." -Face 2014


    Seventeenth on Emerald is selling PoE through Poker

  8. #8
    Junior Member
    cebray95 is offline

    Posts
    8
    I feel like hitting my head against a brick wall after trying to get this to work, which made me appreciate coders even more.

  9. #9
    Member
    savagesun is offline

    Posts
    72
    There is a bit of a barrier to entry I agree. In order to get the bot to run you need to install Visual Studio Express C++ 2013 or later I believe.
    Then, if you want the bot to run you either need to comment out the parts that are running the shell of the mouse movement or write in your own using the shell provided.

    Thanks for taking a peek! I'll try to make the bot a little easier to work with in the near future.
    cebray95 likes this.

  10. #10
    Junior Member
    cebray95 is offline

    Posts
    8
    Quote Originally Posted by savagesun View Post
    There is a bit of a barrier to entry I agree. In order to get the bot to run you need to install Visual Studio Express C++ 2013 or later I believe.
    Then, if you want the bot to run you either need to comment out the parts that are running the shell of the mouse movement or write in your own using the shell provided.

    Thanks for taking a peek! I'll try to make the bot a little easier to work with in the near future.
    I would really appreciate that, from the video it looks like an awesome bot!

Page 1 of 4 123 ... LastLast

Tags for this Thread

Posting Permissions

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