Author Topic: BGB Simple Bot Added to QT-Client  (Read 34739 times)

BGB

  • Global Moderator
  • Full Member
  • *****
  • Posts: 226
    • View Profile
BGB Simple Bot Added to QT-Client
« on: April 07, 2014, 04:56:34 PM »
https://github.com/BGBHUC/huntercoin

This client is the base of what I have been structuring my bots from. This client supports a VERY simple GATHERAFK bot which you can tell to go to a destination and it will return home when it reaches X amount of coins. You need to provide a hucCont.txt file at the location of the executable. There is a sample in the root of the github, of which I will provide below too. Please read through the informational messages about it.

I would expect this to compile as the same means as you are already doing with linux and windows. I have ran this on both platforms.

Notes about this client:
 - This client also has the X,Y coordinates shown in the character table which I find useful.
 - Fees are automatically accpeted.
 - Other errors messages are disabled. Watch the log file.

##################################################################################################################
##################################################################################################################
# !! WORDS OF CAUTION/WISDOM
# -- You should have enabled=0 while your client synchs if you are out of date.
# -- Start small and grow as your system allows you to.
# -- This client is programmed to accept fees automatically.
# -- This doesn't solve some of the game oddities with pending. Expect to get pendings potentially as you would if you are normally playing.
# -- Pay attention to the debug.log file if you want to see what the bots are doing.
##################################################################################################################
# !! LIMITATIONS
# -- You can have a maximum bots of 1000. It is probably better to run multiple clients with less bots though.
# -- This config file only supports one color. You will have to run multiple clients for multi color use.
# -- If you change the color, bots will be disabled from the previous color.
# -- If you change the startingBotIndex, bots will be disabled that are outside the index range.
##################################################################################################################
# !! ABOUT THESE BOTS
# -- This release supports GATHERAFK bot mode only. These bots will go to a destination and wait for coins go generate.
# -- Once they reach "maxLoot", they will return to spawn area. Then they will return to the destination again.
# -- These bots are dumb. They will follow the in game path and not care about enemies.
# -- This config file is reloaded every 5th block. So you can make changes to the bots without restarting the client.
# -- If you want manual control. Set enabled=0 and wait for the 5th block to load. Watch the debug.log file.
###################################################################################################################
# !! LOG FILE
# Everything you need to see about what the bots are doing is in the log file. It shows where they are, where they are going, etc...
# At the end of each block there is a summary line so you can see what is going on with all the players.
# EXAMPLE SUMMARY: 2TEST020  Block: 6979   Generals: 4   Characters: 8  Loot: 1.65   Moves: 0   Pending: 0  Took: 3ms
# Which means...
# 2TEST020, is the first indexed bot name, this is here in case you are tailing multiple debugs.
# Block: This is the block number just processed.
# Generals: This shows how many generals you have on the board.
# Characters: This shows how many characters you have on the board. so Generals*2 would be full teams. Note that pendings teams don't count in the character count.
# Loot: This is the total loot you have on the board. Loot also does not count in the total for current pendings.
# Moves: This is how many moves were issued on the block.
# Pending: This shows how many pendings are on the block.
# Took: How many milliseconds it took to process all the bots.
####################################################################################################################
####################################################################################################################
####################################################################################################################


####################################################################################################################
# The Settings
####################################################################################################################

# If bots should be enabled or not. 0 = NOT enabled (off), 1 = enabled (on). You can set this to zero and provide manual interaction if need be. Note this config file is reloaded every 5th block (0,5).
enabled=0

# namePrefix will be the starting name of your players followed by a 3 digit index, BOT000, BOT001, BOT002, etc...
# Be sure to stay within the limits of the game name size.
namePrefix=BOT

# what color characters do you want? 0 = yellow, 1 = red, 2 = green, 3 = blue
color=0

# How often do you want to generate players? setting to 5 will create bots on blocks that are divisible by 5.
# This helps spread out your players on creation, and limits the amount of transactions per block.
createEveryNthBlock=5

# How many bots do you want to create at a time on nthBlock?
maxCreatePerBlock=1

# The bots behavior. The only mode supported in this release is GATHERAFK
botMode=GATHERAFK

# When a bot reaches this amount, it will return to the spawn area. 100000000 = 1 Coin, 300000000 = 3 Coins, etc...
maxLoot=300000000

# What number index do you want to start your bots at that will appear at the end of your name prefix.
botStartingIndex=0

# What is the maximum number of moves you want to issue per block.
maxMoves=3

# Where do you want your bots to go? This is based on three characters only, so heart pick ups will be ignored.
# This is a SINGLE space delimited list of X,Y coordinates of the game board.
# Columns are ordered by the general, first char, second char.
# Each dest= will be one team of bots. So if you have 4 rows of these, then you will have 4 teams.
# You can add more teams on the fly by adding more rows and on the 5th block they will start to get created.
dest=30,30 72,67 72,67
dest=40,40 73,67 74,67
dest=50,50 75,67 76,67
dest=60,60 77,67 78,67


« Last Edit: April 07, 2014, 05:10:08 PM by BGB »

Renegade

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: BGB Simple Bot Added to QT-Client
« Reply #1 on: April 08, 2014, 04:02:13 AM »
Sigh... hours later... and...

Quote
collect2.exe: error: ld returned 1 exit status
Makefile.Release:279: recipe for target 'release/huntercoin-qt.exe' failed
mingw32-make: *** [release/huntercoin-qt.exe] Error 1

I have no clue how to compile this. I installed QT 4.8.4 and 4.8.5 along with Mingw, and ran __all_easywinbuilder.bat (following directions), but... no luck.

Is there something I'm missing? I have never used Mingw before, and am not familiar with this toolchain. 

BGB

  • Global Moderator
  • Full Member
  • *****
  • Posts: 226
    • View Profile
Re: BGB Simple Bot Added to QT-Client
« Reply #2 on: April 08, 2014, 04:37:39 AM »
I will give this a shot with the easy win builder on a clean box to see if it works. I have not tried that process. I would expect it to compile with that process the same as the real client since I have only added a couple of files.

zy0n

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
    • GithubHUCRepo
Re: BGB Simple Bot Added to QT-Client
« Reply #3 on: April 08, 2014, 09:06:16 AM »
./build/managenamespage.o:managenamespage.cpp:(.text+0x2b61): undefined referenc
e to `BotHelper::getConfig()'
./build/managenamespage.o:managenamespage.cpp:(.text+0x2c9a): undefined referenc
e to `Bot::Bot()'
./build/managenamespage.o:managenamespage.cpp:(.text+0x2d4b): undefined referenc
e to `BotHelper::to_string(int)'
./build/managenamespage.o:managenamespage.cpp:(.text+0x2fb4): undefined referenc
e to `BotHelper::to_string(int)'
./build/managenamespage.o:managenamespage.cpp:(.text+0x313f): undefined referenc
e to `BotHelper::to_string(int)'
./build/managenamespage.o:managenamespage.cpp:(.text+0x5eec): undefined referenc
e to `BotConfig::BotConfig()'
./build/managenamespage.o:managenamespage.cpp:(.text+0x956c): undefined referenc
e to `Bot::calculate(Game::PlayerState const&, Game::GameState const&)'
c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../../mingw32/bin/ld.exe: ./build/ma
nagenamespage.o: bad reloc address 0x4 in section `.data'
collect2: ld returned 1 exit status
Makefile.Release:273: recipe for target 'release/huntercoin-qt.exe' failed
mingw32-make: *** [release/huntercoin-qt.exe] Error 1




Press any key to continue . . .


*fixed that with simply adding #include "botHelper.h" within managenamespage.h, and in the .cpp file aswell. but it still won't compile, I simply copied src directory into my current 'mod' directory so it should compile if you were using the same dependencies correct?


#*#**got it to compile, did fresh install of dependencies into the folder and boom fired right up, cheers mateee
« Last Edit: April 08, 2014, 10:38:27 AM by zy0n »
HUC: HJHB5CLKStCfZjWxEcXsoMT4dEL7oNSP6k

BGB

  • Global Moderator
  • Full Member
  • *****
  • Posts: 226
    • View Profile
Re: BGB Simple Bot Added to QT-Client
« Reply #4 on: April 08, 2014, 03:17:58 PM »
I ran the easy win builder on a clean system following the instructions and everything worked. Not sure what your problem might have been.

!!!!!!! huntercoin-qt DONE: Find huntercoin-qt.exe in ./release :)

nivexuck

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: BGB Simple Bot Added to QT-Client
« Reply #5 on: April 08, 2014, 03:34:45 PM »
is it must run from huntercoin-qt.exe ? or can we run it from daemon ?

BGB

  • Global Moderator
  • Full Member
  • *****
  • Posts: 226
    • View Profile
Re: BGB Simple Bot Added to QT-Client
« Reply #6 on: April 08, 2014, 03:39:34 PM »
this runs from qt

Renegade

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: BGB Simple Bot Added to QT-Client
« Reply #7 on: April 09, 2014, 06:37:30 AM »
I suck. :( Failed again.

What dependencies do I need to make sure it has?

I've installed these:

MinGW
QT 4.8.4
QT 4.8.5

Do I need a particular version of MinGW? Am I missing another dependency? Is there any particular configuration that I need to do for any dependencies?

Snailbrain

  • Developer
  • Hero Member
  • *****
  • Posts: 1000
    • View Profile
Re: BGB Simple Bot Added to QT-Client
« Reply #8 on: April 10, 2014, 11:20:13 PM »
phelix's easywinbuilder should download the correct dependencies and install
 
run _all_easywinbuilder.bat
or something similar

qt will be in release folder, daemon will be in src folder

edit: 4.8.5 is what my qt says (compiled using easywinbuilder)

nivexuck

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: BGB Simple Bot Added to QT-Client
« Reply #9 on: April 10, 2014, 11:53:18 PM »
huntercoin-qt.exe built but it cannot be executed. I can execute my daemon, Still looking the problem.
MinGW
Qt. 4.8.5
libs :
db-4.8.30
boost_1_54_0
miniupnpc-1.8
openssl-1.0.1e

May I use wrong libs ?

BGB

  • Global Moderator
  • Full Member
  • *****
  • Posts: 226
    • View Profile
Re: BGB Simple Bot Added to QT-Client
« Reply #10 on: April 11, 2014, 02:26:53 AM »
What are the last things in the debug.log?

nivexuck

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: BGB Simple Bot Added to QT-Client
« Reply #11 on: April 11, 2014, 04:40:16 AM »
There is no debug.log because hutercoin-qt.exe just show in task manager for several seconds then it gone.

EDIT : Finally got it work after I cleaned up MinGW installation and then reinstalled with easywinbuilder.
« Last Edit: April 11, 2014, 06:54:42 AM by nivexuck »

Renegade

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: BGB Simple Bot Added to QT-Client
« Reply #12 on: April 12, 2014, 06:47:03 PM »
WOOHOO~!

Thank you BGB for that!

I've made 100 HUC profit so far (about), and I'd like to donate that back to the dev team here:

HV6o6KRpRikL7SbUz13SefWFYv94tYuRVJ

Txid: 930dddfc277f8dc4a4ec96da359f6e04211298f6ce14dfa8d58d8b8b85b69238

I've not set out a huge number of bots, and I've worked with the bots manually to get coins, but I've got more ideas now for when I can finally get back to working on my own bot.


spokanebitcoinmine

  • Full Member
  • ***
  • Posts: 111
    • View Profile
Re: BGB Simple Bot Added to QT-Client
« Reply #13 on: April 12, 2014, 09:38:28 PM »
does any one have a complied client that i could trade for huc ? ive tried but have a hard time getting things to work right :(

zy0n

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
    • GithubHUCRepo
Re: BGB Simple Bot Added to QT-Client
« Reply #14 on: April 12, 2014, 11:36:46 PM »
For the sheer fact of how easy it would be to steal your coins or install a virus, I wouldn't suggest downloading a compiled src . If you can't compile then should you really have it. Its really not hard to follow step by step instructions the fact you're offering huc instead of asking how to fix any compile issues tells me you haven't even tried to compile.
HUC: HJHB5CLKStCfZjWxEcXsoMT4dEL7oNSP6k