Announcement

Collapse
No announcement yet.

OpenForager - The Free Open Source Foraging Bot

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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, 02:42 AM.

    #2
    lol you code C++ as if it's Java
    love it <3

    Comment


      #3
      Really? Haha! How so?

      Comment


        #4
        Compare this C code to yours :
        AI for the Puzzle Pirates game "Treasure Drop" based on a minimax algorithm with alpha-beta pruning and transposition tables. - jonls/td-minimax

        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.

        Comment


          #5
          Removed for further testing. Don't worry guys, Sticky will take a look at it.
          Who do you think you are?

          Comment


            #6
            Downloaded already :P
            <3

            Comment


              #7
              Re-approved.

              You can repost your link.
              Last edited by Mehfailz x3; 11-15-2015, 12:47 AM.
              Who do you think you are?

              Comment


                #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.

                Comment


                  #9
                  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.

                  Comment


                    #10
                    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!

                    Comment


                      #11
                      Any chance this could get added to Supply-Crate for.. $1? Lol please don't make it expensive. :v And can you show us noobs(probably me), how to run it through a video some time soon? Thanks.

                      I tried running it with Visual Studio Express 2015, got a build error. I assume this is still under construction? x.x

                      MouseManager.cpp is missing lol
                      Last edited by Snugzy; 11-19-2015, 07:55 AM.

                      Comment


                        #12
                        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.
                        The barrier of entry is good. That was the main issue with the last "open source" bot. It was too easy for idiots to get it and it caused it's detection really quickly.

                        Originally posted by Snugzy View Post
                        Any chance this could get added to Supply-Crate for.. $1? Lol please don't make it expensive. :v And can you show us noobs(probably me), how to run it through a video some time soon? Thanks.

                        I tried running it with Visual Studio Express 2015, got a build error. I assume this is still under construction? x.x

                        MouseManager.cpp is missing lol
                        Read the thread a little bit and you might get a clue as to why it's missing

                        Comment


                          #13
                          Will someone post this compiled?

                          Comment


                            #14
                            Originally posted by Kreayshawn View Post
                            Will someone post this compiled?
                            A staff member would have to do that to ensure the safety of the users. Just wondering but does this come with a manual mode? I can't read C++ unfortunately and couldn't find a trace of drawing.
                            Tips on trading on Bot-Supply: Click Me

                            Comment


                              #15
                              I tried compiling without the mousemanager, but it does not work properly and eventually crashes.

                              Comment

                              Working...
                              X