Jump to content

AI Playerbot


Recommended Posts

ReputationMgr::GetRank was changed in the core and was reverted back later. It should be OK in the latest version.

I ran into an issue about melee combat caused by bot->SetFacingToObject() which sometimes not able to turn the bot facing the enemy. So latest commits have this code reverted back to bot->SetInFront() (MovementActions.cpp:314) which makes client think that bot is not facing the enemy (enemy is behind and the bot is meleeing him in an opposite direction and actually hits :) ). Same issue persists in original Playerbot as well.

Please see this post for the details.

Link to comment
Share on other sites

In the latest version I've added a new boolean configuration parameter (in the aiplayerbot.conf file):

AiPlayerbot.SplineFacing=True

Default value is True which means bot will use spline movements to make him facing the enemy which greatly improves visualisation. The issue is that sometimes in melee fight with multiple enemies bot is staying doing nothing. I am really stuck trying to figure out what causes such behaviour. So any help is appreciated! To be able to do so it is recommended to enable debug logging in the mangosd.conf file:

LogFileLevel = 3

After so every bot action will be logged in the Server.log file. Moreover, this log can be analysed with java tools I've written (contrib/playerbot-utils/log directory, requres jdk and maven to be built), but unfortunately they won't help in this particular issue :(

Changing the value back to False turns off spline facing so bot will fight better (I think) but client will show them facing in opposite direction (Please see http://getmangos.eu/community/topic/17812/setfacingtoobject-setinfront-and-melee-attack/ for details).

Link to comment
Share on other sites

  • 41 years later...

Just in case somebody is interested...

http://ike3.github.com/mangos/

After a year of development I decided to share it. This is complete playerbot rewrite based on strategies.

Thanks to original playerbot creators, you are welcome to reuse anything you may find useful :)

note: build is often broken except you use visual studio 2005, but can be easily fixed by including every file from src/game/playerbot directory.

Link to comment
Share on other sites

I have few questions:

Is it a fork of playerbot ?

"This is a fork of playerbot with completely different AI based on strategies. "

another question:what features are included ?

"This includes:

* A set of actions that bot can do (i.e., cast a frost nova)

* A set of triggers telling bot that something is happened (i.e., enemy is too close)

* A set of strategies that combines actions and triggers making bot to react to world events.

* Structured and maintainable source code."

from the website http://ike3.github.com/mangos/

Link to comment
Share on other sites

Yes, action queue, priority, event handling...this structure is much better than the original version which runs the whole iteration again and again, and this is exactly what we need to improve AI to a new level. I'll try it out and see the detail of those features, terrific work dude!

Link to comment
Share on other sites

Thank you!

Some short answers:

* This is a fork incompatible with original playerbot, but offers new features (Please see documentation section on the site). I tried to improve original version in the beginning, but then compatibility has been lost :(

* There is still a lot of work to do (performance, configuration, localization issues, etc.)

* Bot controlling can be sometimes difficult, so user experience can be poor.

Unfortunately I have very little time to spare on this but will continue until the fun is lost :)

Link to comment
Share on other sites

* Bot controlling can be sometimes difficult, so user experience can be poor.

I think the better idea is to create a little addon for bot controling.

This will simplify alot the usage of the bot.

Do not have time to test it for now so please if anyone can do some comparaison from actual version here?

Olso the opinion of blueboy is welcome :)

Greetings

Link to comment
Share on other sites

Hi,

Interesting, you have obviously spent a grest deal of time on this. Nice one :D Perhap playerbot and playerbot ai can work together to produce better overall bot project. If it is any help, I have some suggestions that may help encourage more users to test out your code.

I don't think it is a good idea to have auctionhousebot code merged into the playerbot ai code. Hopefully it won't be too long before cyberium's auctionhousebot code is included in the core. When it does, it will have to be removed.

I spent ages removing a ton of whitespaces from the code. Not essential I know, but if the github code is clean, more people will try it out.

I had a number of issues while compiling under linux. I eventually managed to compile it and have included a patch here for those who require it.

diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp
index c2de001..bed36bd 100644
--- a/src/game/CharacterHandler.cpp
+++ b/src/game/CharacterHandler.cpp
@@ -39,7 +39,7 @@
#include "Language.h"

// Playerbot mod:
-#include "playerbot/Playerbot.h"
+#include "playerbot/playerbot.h"

// config option SkipCinematics supported values
enum CinematicsSkipMode
diff --git a/src/game/Makefile.am b/src/game/Makefile.am
index 36332f4..ebd6a73 100644
--- a/src/game/Makefile.am
+++ b/src/game/Makefile.am
@@ -424,6 +424,8 @@ libmangosgame_a_SOURCES = \\
    playerbot/strategy/hunter/HunterActionFactory.h \\
    playerbot/strategy/hunter/HunterActions.cpp \\
    playerbot/strategy/hunter/HunterActions.h \\
+    playerbot/strategy/hunter/HunterBuffStrategies.cpp \\
+    playerbot/strategy/hunter/HunterBuffStrategies.h \\
    playerbot/strategy/hunter/HunterMultipliers.cpp \\
    playerbot/strategy/hunter/HunterMultipliers.h \\
    playerbot/strategy/hunter/HunterTriggers.cpp \\
@@ -454,6 +456,8 @@ libmangosgame_a_SOURCES = \\
    playerbot/strategy/paladin/PaladinActionFactory.h \\
    playerbot/strategy/paladin/PaladinActions.cpp \\
    playerbot/strategy/paladin/PaladinActions.h \\
+    playerbot/strategy/paladin/PaladinBuffStrategies.cpp \\
+    playerbot/strategy/paladin/PaladinBuffStrategies.h \\
    playerbot/strategy/paladin/PaladinMultipliers.cpp \\
    playerbot/strategy/paladin/PaladinMultipliers.h \\
    playerbot/strategy/paladin/PaladinTriggers.cpp \\
diff --git a/src/game/playerbot/ai/AiTargetManager.cpp b/src/game/playerbot/ai/AiTargetManager.cpp
index 92b7734..0996c67 100644
--- a/src/game/playerbot/ai/AiTargetManager.cpp
+++ b/src/game/playerbot/ai/AiTargetManager.cpp
@@ -1,7 +1,7 @@
#include "../../pchdef.h"
#include "../playerbot.h"
#include "FindTargetStrategy.h"
-
+#include "CellImpl.h"
#include "../../GridNotifiers.h"

using namespace ai;

Cheers

Hope this helps

Link to comment
Share on other sites

I have a compile problem.

1>------ Build started: Project: tbb, Configuration: Release Win32 ------
2>------ Build started: Project: genrevision, Configuration: Release Win32 ------
1>  win32-tbb-export.def
1>  generating tbb.def file
1>  Assembling [inputs]...
2>  genrevision.cpp
1>  Assembling [inputs]...
1>  concurrent_queue_v2.cpp
1>  concurrent_vector_v2.cpp
2>  Generating code
2>  Finished generating code
2>  genrevision.vcxproj -> C:\\MaNGOS\\MANGOS\\mangos\\win\\VC100\\.\\genrevision__Win32_Release\\genrevision.exe
1>  spin_rw_mutex_v2.cpp
1>  rml_tbb.cpp
3>------ Build started: Project: zlib, Configuration: Release Win32 ------
1>  cache_aligned_allocator.cpp
3>  adler32.c
3>  compress.c
3>  crc32.c
3>  deflate.c
1>  concurrent_hash_map.cpp
3>  example.c
3>  gzio.c
3>  infback.c
3>  inffast.c
1>  concurrent_queue.cpp
3>  inflate.c
3>  inftrees.c
3>  trees.c
3>  uncompr.c
3>  zutil.c
1>  concurrent_vector.cpp
3>  zlib.vcxproj -> C:\\MaNGOS\\MANGOS\\mangos\\win\\VC100\\.\\zlib__Win32_Release\\zlib.lib
4>------ Build started: Project: ACE_Wrappers, Configuration: Release Win32 ------
4>  ACE.cpp
4>  ACE_crc32.cpp
1>  dynamic_link.cpp
1>  itt_notify.cpp
1>  mutex.cpp
4>  ACE_crc_ccitt.cpp
1>  pipeline.cpp
1>  private_server.cpp
1>  queuing_mutex.cpp
4>  ace_wchar.cpp
4>  Activation_Queue.cpp
1>  queuing_rw_mutex.cpp
1>  recursive_mutex.cpp
4>  Active_Map_Manager.cpp
1>  spin_mutex.cpp
1>  spin_rw_mutex.cpp
4>  Addr.cpp
1>  task.cpp
1>  tbb_misc.cpp
4>  Argv_Type_Converter.cpp
4>  Assert.cpp
4>  Asynch_IO.cpp
1>  Compiling...
1>  tbb_thread.cpp
4>  Asynch_IO_Impl.cpp
4>  Asynch_Pseudo_Task.cpp
4>  ATM_Acceptor.cpp
4>  ATM_Addr.cpp
4>  ATM_Connector.cpp
4>  ATM_Params.cpp
4>  ATM_QoS.cpp
4>  ATM_Stream.cpp
4>  Atomic_Op.cpp
4>  Auto_Event.cpp
4>  Barrier.cpp
4>  Base_Thread_Adapter.cpp
4>  Based_Pointer_Repository.cpp
4>  Basic_Stats.cpp
4>  Basic_Types.cpp
4>  Capabilities.cpp
4>  CDR_Base.cpp
4>  CDR_Size.cpp
4>  CDR_Stream.cpp
4>  Cleanup.cpp
4>  Codecs.cpp
4>  Codeset_IBM1047.cpp
4>  Codeset_Registry.cpp
4>  Codeset_Registry_db.cpp
4>  Condition_Recursive_Thread_Mutex.cpp
4>  Condition_Thread_Mutex.cpp
4>  Configuration.cpp
4>  Configuration_Import_Export.cpp
4>  Connection_Recycling_Strategy.cpp
4>  Containers.cpp
4>  Copy_Disabled.cpp
4>  Countdown_Time.cpp
4>  Date_Time.cpp
4>  DEV.cpp
4>  DEV_Addr.cpp
4>  DEV_Connector.cpp
4>  DEV_IO.cpp
4>  Dev_Poll_Reactor.cpp
4>  Dirent.cpp
4>  Dirent_Selector.cpp
4>  DLL.cpp
4>  DLL_Manager.cpp
4>  Dump.cpp
4>  Dynamic.cpp
4>  Dynamic_Message_Strategy.cpp
4>  Dynamic_Service_Base.cpp
4>  Dynamic_Service_Dependency.cpp
4>  Encoding_Converter.cpp
4>  Encoding_Converter_Factory.cpp
4>  Event.cpp
4>  Event_Handler.cpp
4>  FIFO.cpp
4>  FIFO_Recv.cpp
4>  FIFO_Recv_Msg.cpp
4>  FIFO_Send.cpp
4>  FIFO_Send_Msg.cpp
4>  FILE.cpp
4>  FILE_Addr.cpp
4>  FILE_Connector.cpp
4>  FILE_IO.cpp
4>  File_Lock.cpp
4>  Filecache.cpp
4>  Flag_Manip.cpp
4>  Framework_Component.cpp
4>  Functor.cpp
4>  Functor_String.cpp
4>  Get_Opt.cpp
4>  gethrtime.cpp
4>  Handle_Ops.cpp
4>  Handle_Set.cpp
4>  Hashable.cpp
4>  High_Res_Timer.cpp
4>  ICMP_Socket.cpp
4>  INET_Addr.cpp
4>  Init_ACE.cpp
4>  IO_Cntl_Msg.cpp
4>  IO_SAP.cpp
4>  IOStream.cpp
4>  IPC_SAP.cpp
4>  Lib_Find.cpp
4>  Local_Memory_Pool.cpp
4>  Local_Name_Space.cpp
4>  Local_Tokens.cpp
4>  Lock.cpp
4>  Log_Msg.cpp
4>  Log_Msg_Backend.cpp
4>  Log_Msg_Callback.cpp
4>  Log_Msg_IPC.cpp
4>  Log_Msg_NT_Event_Log.cpp
4>  Log_Msg_UNIX_Syslog.cpp
4>  Log_Record.cpp
4>  Logging_Strategy.cpp
4>  LSOCK.cpp
4>  LSOCK_Acceptor.cpp
4>  LSOCK_CODgram.cpp
4>  LSOCK_Connector.cpp
4>  LSOCK_Dgram.cpp
4>  LSOCK_Stream.cpp
4>  Malloc.cpp
4>  Malloc_Allocator.cpp
4>  Manual_Event.cpp
4>  MEM_Acceptor.cpp
4>  MEM_Addr.cpp
4>  MEM_Connector.cpp
4>  MEM_IO.cpp
4>  Mem_Map.cpp
4>  MEM_SAP.cpp
4>  MEM_Stream.cpp
4>  Message_Block.cpp
4>  Message_Queue.cpp
4>  Message_Queue_NT.cpp
4>  Message_Queue_Vx.cpp
4>  Method_Request.cpp
4>  MMAP_Memory_Pool.cpp
4>  Monitor_Admin.cpp
4>  Monitor_Admin_Manager.cpp
4>  Monitor_Base.cpp
4>  Monitor_Control_Action.cpp
4>  Monitor_Control_Types.cpp
4>  Monitor_Point_Registry.cpp
4>  Monitor_Size.cpp
4>  Msg_WFMO_Reactor.cpp
4>  Multihomed_INET_Addr.cpp
4>  Mutex.cpp
4>  Name_Proxy.cpp
4>  Name_Request_Reply.cpp
4>  Name_Space.cpp
4>  Naming_Context.cpp
4>  Netlink_Addr.cpp
4>  Notification_Queue.cpp
4>  Notification_Strategy.cpp
4>  NT_Service.cpp
4>  Obchunk.cpp
4>  Object_Manager.cpp
4>  Object_Manager_Base.cpp
4>  OS_Errno.cpp
4>  OS_Log_Msg_Attributes.cpp
4>  OS_main.cpp
4>  OS_NS_arpa_inet.cpp
4>  OS_NS_ctype.cpp
4>  OS_NS_dirent.cpp
4>  OS_NS_dlfcn.cpp
4>  OS_NS_errno.cpp
4>  OS_NS_fcntl.cpp
4>  OS_NS_math.cpp
4>  OS_NS_netdb.cpp
4>  OS_NS_poll.cpp
4>  OS_NS_pwd.cpp
4>  OS_NS_regex.cpp
4>  OS_NS_signal.cpp
4>  OS_NS_stdio.cpp
4>  OS_NS_stdlib.cpp
4>  OS_NS_string.cpp
4>  OS_NS_strings.cpp
4>  OS_NS_stropts.cpp
4>  OS_NS_sys_mman.cpp
4>  OS_NS_sys_msg.cpp
4>  OS_NS_sys_resource.cpp
4>  OS_NS_sys_select.cpp
4>  OS_NS_sys_sendfile.cpp
4>  OS_NS_sys_shm.cpp
4>  OS_NS_sys_socket.cpp
4>  OS_NS_sys_stat.cpp
4>  OS_NS_sys_time.cpp
4>  OS_NS_sys_uio.cpp
4>  OS_NS_sys_utsname.cpp
4>  OS_NS_sys_wait.cpp
4>  OS_NS_Thread.cpp
4>  OS_NS_time.cpp
4>  OS_NS_unistd.cpp
4>  OS_NS_wchar.cpp
4>  OS_NS_wctype.cpp
4>  OS_QoS.cpp
4>  OS_Thread_Adapter.cpp
4>  OS_TLI.cpp
4>  Pagefile_Memory_Pool.cpp
4>  Parse_Node.cpp
4>  PI_Malloc.cpp
4>  Ping_Socket.cpp
4>  Pipe.cpp
4>  POSIX_Asynch_IO.cpp
4>  POSIX_CB_Proactor.cpp
4>  POSIX_Proactor.cpp
4>  Priority_Reactor.cpp
4>  Proactor.cpp
4>  Proactor_Impl.cpp
4>  Process.cpp
4>  Process_Manager.cpp
4>  Process_Mutex.cpp
4>  Process_Semaphore.cpp
4>  Profile_Timer.cpp
4>  Reactor.cpp
4>  Reactor_Impl.cpp
4>  Reactor_Notification_Strategy.cpp
4>  Reactor_Timer_Interface.cpp
4>  Read_Buffer.cpp
4>  Recursive_Thread_Mutex.cpp
4>  Recyclable.cpp
4>  Registry.cpp
4>  Registry_Name_Space.cpp
4>  Remote_Name_Space.cpp
4>  Remote_Tokens.cpp
4>  RW_Mutex.cpp
4>  RW_Process_Mutex.cpp
4>  RW_Thread_Mutex.cpp
4>  Sample_History.cpp
4>  Sbrk_Memory_Pool.cpp
4>  Sched_Params.cpp
4>  Select_Reactor_Base.cpp
4>  Semaphore.cpp
4>  Service_Config.cpp
4>  Service_Gestalt.cpp
4>  Service_Manager.cpp
4>  Service_Object.cpp
4>  Service_Repository.cpp
4>  Service_Types.cpp
4>  Shared_Memory.cpp
4>  Shared_Memory_MM.cpp
4>  Shared_Memory_Pool.cpp
4>  Shared_Memory_SV.cpp
4>  Shared_Object.cpp
4>  Sig_Adapter.cpp
4>  Sig_Handler.cpp
4>  Signal.cpp
4>  SOCK.cpp
4>  SOCK_Acceptor.cpp
4>  SOCK_CODgram.cpp
4>  Sock_Connect.cpp
4>  SOCK_Connector.cpp
4>  SOCK_Dgram.cpp
4>  SOCK_Dgram_Bcast.cpp
4>  SOCK_Dgram_Mcast.cpp
4>  SOCK_IO.cpp
4>  SOCK_Netlink.cpp
4>  SOCK_SEQPACK_Acceptor.cpp
4>  SOCK_SEQPACK_Association.cpp
4>  SOCK_SEQPACK_Connector.cpp
4>  SOCK_Stream.cpp
4>  SPIPE.cpp
4>  SPIPE_Acceptor.cpp
4>  SPIPE_Addr.cpp
4>  SPIPE_Connector.cpp
4>  SPIPE_Stream.cpp
4>  SString.cpp
4>  Stack_Trace.cpp
4>  Stats.cpp
4>  String_Base_Const.cpp
4>  SUN_Proactor.cpp
4>  SV_Message.cpp
4>  SV_Message_Queue.cpp
4>  SV_Semaphore_Complex.cpp
4>  SV_Semaphore_Simple.cpp
4>  SV_Shared_Memory.cpp
4>  Svc_Conf_Lexer.cpp
4>  Svc_Conf_y.cpp
4>  Synch_Options.cpp
4>  System_Time.cpp
4>  Task.cpp
4>  Thread.cpp
4>  Thread_Adapter.cpp
4>  Thread_Control.cpp
4>  Thread_Exit.cpp
4>  Thread_Hook.cpp
4>  Thread_Manager.cpp
4>  Thread_Mutex.cpp
4>  Thread_Semaphore.cpp
4>  Throughput_Stats.cpp
4>  Time_Value.cpp
4>  Timeprobe.cpp
4>  TLI.cpp
4>  TLI_Acceptor.cpp
4>  TLI_Connector.cpp
4>  TLI_Stream.cpp
4>  Token.cpp
4>  Token_Collection.cpp
4>  Token_Invariants.cpp
4>  Token_Manager.cpp
4>  Token_Request_Reply.cpp
4>  TP_Reactor.cpp
4>  Trace.cpp
4>  TSS_Adapter.cpp
4>  TTY_IO.cpp
4>  UNIX_Addr.cpp
4>  UPIPE_Acceptor.cpp
4>  UPIPE_Connector.cpp
4>  UPIPE_Stream.cpp
4>  UTF16_Encoding_Converter.cpp
4>  UTF32_Encoding_Converter.cpp
4>  UTF8_Encoding_Converter.cpp
4>  UUID.cpp
4>  WFMO_Reactor.cpp
4>  WIN32_Asynch_IO.cpp
4>  WIN32_Proactor.cpp
4>  XML_Svc_Conf.cpp
4>  XTI_ATM_Mcast.cpp
1>  itt_notify_proxy.c
4>  Atomic_Op_Sparc.c
4>  Rtems_init.c
1>     Creating library ..\\..\\dep\\lib\\Win32_Release\\tbb.lib and object ..\\..\\dep\\lib\\Win32_Release\\tbb.exp
1>  Generating code
1>  Finished generating code
4>     Creating library ..\\..\\dep\\lib\\Win32_Release\\ACE.lib and object ..\\..\\dep\\lib\\Win32_Release\\ACE.exp
4>  ACE_vc10.vcxproj -> C:\\MaNGOS\\MANGOS\\mangos\\win\\VC100\\..\\..\\dep\\lib\\Win32_Release\\ACE.dll
1>  tbb.vcxproj -> C:\\MaNGOS\\MANGOS\\mangos\\win\\VC100\\..\\..\\dep\\lib\\Win32_Release\\tbb.dll
5>------ Build started: Project: g3dlite, Configuration: Release Win32 ------
5>  AABox.cpp
5>  Box.cpp
6>------ Build started: Project: tbbmalloc, Configuration: Release Win32 ------
6>  generating tbbmalloc.def file
6>  win32-tbbmalloc-export.def
6>  Assembling [inputs]...
6>  Assembling [inputs]...
6>  MemoryAllocator.cpp
5>  Crypto.cpp
5>  format.cpp
6>  tbbmalloc.cpp
6>  dynamic_link.cpp
5>  Matrix3.cpp
6>  tbb_misc.cpp
5>  Plane.cpp
6>  itt_notify_proxy.c
5>  RegistryUtil.cpp
6>     Creating library ..\\..\\dep\\lib\\Win32_Release\\tbbmalloc.lib and object ..\\..\\dep\\lib\\Win32_Release\\tbbmalloc.exp
6>  Generating code
6>  Finished generating code
6>  tbbmalloc.vcxproj -> C:\\MaNGOS\\MANGOS\\mangos\\win\\VC100\\..\\..\\dep\\lib\\Win32_Release\\tbbmalloc.dll
5>  System.cpp
5>  Triangle.cpp
7>------ Build started: Project: framework, Configuration: Release Win32 ------
5>  Port System::memcpy SIMD to all platforms
5>  Port System::memfill SIMD to all platforms
5>  Vector3.cpp
5>  Vector4.cpp
7>  MemoryManagement.cpp
7>  ObjectLifeTime.cpp
7>  EventProcessor.cpp
5>  debugAssert.cpp
5>  fileutils.cpp
5>  g3dmath.cpp
5>..\\..\\dep\\src\\g3dlite\\g3dmath.cpp(43): warning C4244: 'initializing' : conversion from 'double' to 'const float', possible loss of data
5>  g3dfnmatch.cpp
5>  prompt.cpp
5>  stringutils.cpp
5>  Any.cpp
5>  BinaryFormat.cpp
5>  BinaryInput.cpp
5>  BinaryOutput.cpp
7>  framework.vcxproj -> C:\\MaNGOS\\MANGOS\\mangos\\win\\VC100\\.\\framework__Win32_Release\\framework.lib
8>------ Build started: Project: shared, Configuration: Release Win32 ------
8>  Extract revision
8>  Performing Build SystemConfig.h
8>          1 fájl másolása megtörtént.
8>  AuthCrypt.cpp
8>  BigNumber.cpp
5>  Capsule.cpp
8>  HMACSHA1.cpp
5>  CollisionDetection.cpp
5>  CoordinateFrame.cpp
8>  SARC4.cpp
8>  Sha1.cpp
5>  Cylinder.cpp
8>  Common.cpp
5>  Line.cpp
8>  Config.cpp
5>  LineSegment.cpp
5>  Log.cpp
8>  Database.cpp
5>  Matrix4.cpp
5>  MemoryManager.cpp
8>  DatabaseMysql.cpp
5>  Quat.cpp
5>  Random.cpp
8>  DBCFileLoader.cpp
5>  Ray.cpp
5>  ReferenceCount.cpp
8>  Field.cpp
8>  QueryResultMysql.cpp
8>  SqlDelayThread.cpp
5>  Sphere.cpp
5>  TextInput.cpp
8>  SqlOperations.cpp
5>  TextOutput.cpp
5>  UprightFrame.cpp
8>  SQLStorage.cpp
5>  Vector2.cpp
8>  Log.cpp
8>  MemoryLeaks.cpp
5>  g3dlite.vcxproj -> C:\\MaNGOS\\MANGOS\\mangos\\win\\VC100\\.\\g3dlite__Win32_Release\\g3dlite.lib
8>  ProgressBar.cpp
8>  ServiceWin32.cpp
8>  Threading.cpp
8>  Util.cpp
8>  shared.vcxproj -> C:\\MaNGOS\\MANGOS\\mangos\\win\\VC100\\.\\shared__Win32_Release\\shared.lib
9>------ Build started: Project: realmd, Configuration: Release Win32 ------
10>------ Build started: Project: game, Configuration: Release Win32 ------
10>  pchdef.cpp
9>  AuthSocket.cpp
9>  BufferedSocket.cpp
9>  Main.cpp
9>  PatchHandler.cpp
9>  RealmList.cpp
9>  WheatyExceptionReport.cpp
9>     Creating library ..\\..\\bin\\Win32_Release\\realmd.lib and object ..\\..\\bin\\Win32_Release\\realmd.exp
9>  realmd.vcxproj -> C:\\MaNGOS\\MANGOS\\mangos\\win\\VC100\\..\\..\\bin\\Win32_Release\\realmd.exe
10>  AccountMgr.cpp
10>  AchievementMgr.cpp
10>  AggressorAI.cpp
10>  ArenaTeam.cpp
10>  ArenaTeamHandler.cpp
10>  AuctionHouseBot.cpp
10>  AuctionHouseHandler.cpp
10>  AuctionHouseMgr.cpp
10>  Bag.cpp
10>  BattleGround.cpp
10>  BattleGroundAA.cpp
10>  BattleGroundAB.cpp
10>  BattleGroundRB.cpp
10>  BattleGroundAV.cpp
10>  BattleGroundBE.cpp
10>  BattleGroundDS.cpp
10>  BattleGroundEY.cpp
10>  BattleGroundHandler.cpp
10>  BattleGroundIC.cpp
10>  BattleGroundMgr.cpp
10>  BattleGroundNA.cpp
10>  BattleGroundRL.cpp
10>  BattleGroundRV.cpp
10>  BattleGroundSA.cpp
10>  BattleGroundWS.cpp
10>  Calendar.cpp
10>  CalendarHandler.cpp
10>  Camera.cpp
10>  Channel.cpp
10>  ChannelHandler.cpp
10>  ChannelMgr.cpp
10>  CharacterDatabaseCleaner.cpp
10>  CharacterHandler.cpp
10>  Chat.cpp
10>  ChatHandler.cpp
10>  CombatHandler.cpp
10>  ConfusedMovementGenerator.cpp
10>  Corpse.cpp
10>  Creature.cpp
10>  CreatureAI.cpp
10>  CreatureAIRegistry.cpp
10>  CreatureAISelector.cpp
10>  CreatureEventAI.cpp
10>  CreatureEventAIMgr.cpp
10>  DBCStores.cpp
10>  debugcmds.cpp
10>  DestinationHolder.cpp
10>  DuelHandler.cpp
10>  DynamicObject.cpp
10>  FleeingMovementGenerator.cpp
10>  FollowerReference.cpp
10>  GameEventMgr.cpp
10>  GameObject.cpp
10>  GMTicketHandler.cpp
10>  GMTicketMgr.cpp
10>  GossipDef.cpp
10>  GridMap.cpp
10>  GridNotifiers.cpp
10>  GridStates.cpp
10>  Group.cpp
10>  GroupHandler.cpp
10>  GroupReference.cpp
10>  GuardAI.cpp
10>  Guild.cpp
10>  GuildHandler.cpp
10>  HomeMovementGenerator.cpp
10>  HostileRefManager.cpp
10>  IdleMovementGenerator.cpp
10>  InstanceData.cpp
10>  InstanceSaveMgr.cpp
10>  Item.cpp
10>  ItemEnchantmentMgr.cpp
10>  ItemHandler.cpp
10>  Level0.cpp
10>  Level1.cpp
10>  Level2.cpp
10>  Level3.cpp
10>  LFGHandler.cpp
10>  LootHandler.cpp
10>  LootMgr.cpp
10>  Mail.cpp
10>  Map.cpp
10>  MapManager.cpp
10>  MassMailMgr.cpp
10>  MiscHandler.cpp
10>  MotionMaster.cpp
10>  MovementGenerator.cpp
10>  MovementHandler.cpp
10>  NPCHandler.cpp
10>  NullCreatureAI.cpp
10>  Object.cpp
10>  ObjectAccessor.cpp
10>  ObjectGridLoader.cpp
10>  ObjectMgr.cpp
10>  ObjectGuid.cpp
10>  ObjectPosSelector.cpp
10>  Opcodes.cpp
10>  Pet.cpp
10>  PetAI.cpp
10>  PetHandler.cpp
10>  PetitionsHandler.cpp
10>  Player.cpp
10>  PlayerDump.cpp
10>  PointMovementGenerator.cpp
10>  PoolManager.cpp
10>  QueryHandler.cpp
10>  QuestDef.cpp
10>  QuestHandler.cpp
10>  RandomMovementGenerator.cpp
10>  ReactorAI.cpp
10>  ReputationMgr.cpp
10>  ScriptMgr.cpp
10>  SkillDiscovery.cpp
10>  SkillExtraItems.cpp
10>  SkillHandler.cpp
10>  SocialMgr.cpp
10>  Spell.cpp
10>  SpellAuras.cpp
10>  SQLStorages.cpp
10>  UnitAuraProcHandler.cpp
10>  SpellEffects.cpp
10>  SpellHandler.cpp
10>  SpellMgr.cpp
10>  StatSystem.cpp
10>  TargetedMovementGenerator.cpp
10>  TaxiHandler.cpp
10>  TemporarySummon.cpp
10>  ThreatManager.cpp
10>  Totem.cpp
10>  TotemAI.cpp
10>  TradeHandler.cpp
10>  Transports.cpp
10>  Unit.cpp
10>  UpdateData.cpp
10>  Vehicle.cpp
10>  VoiceChatHandler.cpp
10>  WaypointManager.cpp
10>  WaypointMovementGenerator.cpp
10>  Weather.cpp
10>  World.cpp
10>  WorldSession.cpp
10>  WorldSocket.cpp
10>  WorldSocketMgr.cpp
10>  BIH.cpp
10>  MapTree.cpp
10>  ModelInstance.cpp
10>  TileAssembler.cpp
10>  VMapFactory.cpp
10>  VMapManager2.cpp
10>  WorldModel.cpp
10>  game.vcxproj -> C:\\MaNGOS\\MANGOS\\mangos\\win\\VC100\\.\\game__Win32_Release\\game.lib
11>------ Build started: Project: mangosd, Configuration: Release Win32 ------
11>  stdsoap2.cpp
11>  soapServer.cpp
11>..\\..\\dep\\src\\gsoap\\stdsoap2.cpp(835): warning C4244: 'return' : conversion from 'std::streamsize' to 'size_t', possible loss of data
11>  soapC.cpp
11>  MaNGOSsoap.cpp
11>  CliRunnable.cpp
11>  Main.cpp
11>  Master.cpp
11>  RASocket.cpp
11>  WorldRunnable.cpp
11>  WheatyExceptionReport.cpp
11>     Creating library .\\mangosd__Win32_Release\\mangosd.lib and object .\\mangosd__Win32_Release\\mangosd.exp
11>game.lib(CharacterHandler.obj) : error LNK2001: unresolved external symbol "public: virtual __thiscall PlayerbotMgr::~PlayerbotMgr(void)" (??1PlayerbotMgr@@UAE@XZ)
11>game.lib(Player.obj) : error LNK2019: unresolved external symbol "public: virtual __thiscall PlayerbotMgr::~PlayerbotMgr(void)" (??1PlayerbotMgr@@UAE@XZ) referenced in function "public: virtual void * __thiscall PlayerbotMgr::`scalar deleting destructor'(unsigned int)" (??_GPlayerbotMgr@@UAEPAXI@Z)
11>game.lib(WorldSession.obj) : error LNK2001: unresolved external symbol "public: virtual __thiscall PlayerbotMgr::~PlayerbotMgr(void)" (??1PlayerbotMgr@@UAE@XZ)
11>game.lib(ChatHandler.obj) : error LNK2001: unresolved external symbol "public: virtual __thiscall PlayerbotMgr::~PlayerbotMgr(void)" (??1PlayerbotMgr@@UAE@XZ)
11>game.lib(QuestHandler.obj) : error LNK2001: unresolved external symbol "public: virtual __thiscall PlayerbotMgr::~PlayerbotMgr(void)" (??1PlayerbotMgr@@UAE@XZ)
11>game.lib(Player.obj) : error LNK2019: unresolved external symbol "public: void __thiscall PlayerbotMgr::UpdateAI(unsigned int)" (?UpdateAI@PlayerbotMgr@@QAEXI@Z) referenced in function "public: virtual void __thiscall Player::Update(unsigned int,unsigned int)" (?Update@Player@@UAEXII@Z)
11>game.lib(Player.obj) : error LNK2019: unresolved external symbol "public: void __thiscall PlayerbotAI::UpdateAI(unsigned int)" (?UpdateAI@PlayerbotAI@@QAEXI@Z) referenced in function "public: virtual void __thiscall Player::Update(unsigned int,unsigned int)" (?Update@Player@@UAEXII@Z)
11>game.lib(Chat.obj) : error LNK2019: unresolved external symbol "protected: bool __thiscall ChatHandler::HandlePlayerbotCommand(char *)" (?HandlePlayerbotCommand@ChatHandler@@IAE_NPAD@Z) referenced in function "protected: class ChatCommand * __thiscall ChatHandler::getCommandTable(void)" (?getCommandTable@ChatHandler@@IAEPAVChatCommand@@XZ)
11>game.lib(WorldSession.obj) : error LNK2019: unresolved external symbol "public: void __thiscall PlayerbotMgr::HandleMasterOutgoingPacket(class WorldPacket const &)" (?HandleMasterOutgoingPacket@PlayerbotMgr@@QAEXABVWorldPacket@@@Z) referenced in function "public: void __thiscall WorldSession::SendPacket(class WorldPacket const *)" (?SendPacket@WorldSession@@QAEXPBVWorldPacket@@@Z)
11>game.lib(WorldSession.obj) : error LNK2019: unresolved external symbol "public: void __thiscall PlayerbotAI::HandleBotOutgoingPacket(class WorldPacket const &)" (?HandleBotOutgoingPacket@PlayerbotAI@@QAEXABVWorldPacket@@@Z) referenced in function "public: void __thiscall WorldSession::SendPacket(class WorldPacket const *)" (?SendPacket@WorldSession@@QAEXPBVWorldPacket@@@Z)
11>game.lib(WorldSession.obj) : error LNK2019: unresolved external symbol "public: void __thiscall PlayerbotMgr::LogoutAllBots(void)" (?LogoutAllBots@PlayerbotMgr@@QAEXXZ) referenced in function "public: void __thiscall WorldSession::LogoutPlayer(bool)" (?LogoutPlayer@WorldSession@@QAEX_N@Z)
11>game.lib(WorldSession.obj) : error LNK2019: unresolved external symbol "public: void __thiscall PlayerbotAI::HandleTeleportAck(void)" (?HandleTeleportAck@PlayerbotAI@@QAEXXZ) referenced in function __catch$?Update@WorldSession@@QAE_NIAAVPacketFilter@@@Z$0
11>game.lib(WorldSession.obj) : error LNK2019: unresolved external symbol "public: void __thiscall PlayerbotMgr::HandleMasterIncomingPacket(class WorldPacket const &)" (?HandleMasterIncomingPacket@PlayerbotMgr@@QAEXABVWorldPacket@@@Z) referenced in function "public: bool __thiscall WorldSession::Update(unsigned int,class PacketFilter &)" (?Update@WorldSession@@QAE_NIAAVPacketFilter@@@Z)
11>game.lib(ChatHandler.obj) : error LNK2019: unresolved external symbol "public: void __thiscall PlayerbotAI::HandleCommand(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class Player &)" (?HandleCommand@PlayerbotAI@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAVPlayer@@@Z) referenced in function "public: void __thiscall WorldSession::HandleMessagechatOpcode(class WorldPacket &)" (?HandleMessagechatOpcode@WorldSession@@QAEXAAVWorldPacket@@@Z)
11>game.lib(QuestHandler.obj) : error LNK2019: unresolved external symbol "public: void __thiscall ai::AiQuestManager::AcceptQuest(class Quest const *,class Player *)" (?AcceptQuest@AiQuestManager@ai@@QAEXPBVQuest@@PAVPlayer@@@Z) referenced in function "public: void __thiscall WorldSession::HandlePushQuestToParty(class WorldPacket &)" (?HandlePushQuestToParty@WorldSession@@QAEXAAVWorldPacket@@@Z)
11>game.lib(CharacterHandler.obj) : error LNK2019: unresolved external symbol "public: void __thiscall PlayerbotMgr::LogoutPlayerBot(unsigned __int64)" (?LogoutPlayerBot@PlayerbotMgr@@QAEX_K@Z) referenced in function "public: void __thiscall CharacterHandler::HandlePlayerBotLoginCallback(class QueryResult *,class SqlQueryHolder *)" (?HandlePlayerBotLoginCallback@CharacterHandler@@QAEXPAVQueryResult@@PAVSqlQueryHolder@@@Z)
11>game.lib(CharacterHandler.obj) : error LNK2019: unresolved external symbol "public: void __thiscall PlayerbotMgr::OnBotLogin(class Player * const)" (?OnBotLogin@PlayerbotMgr@@QAEXQAVPlayer@@@Z) referenced in function "public: void __thiscall CharacterHandler::HandlePlayerBotLoginCallback(class QueryResult *,class SqlQueryHolder *)" (?HandlePlayerBotLoginCallback@CharacterHandler@@QAEXPAVQueryResult@@PAVSqlQueryHolder@@@Z)
11>..\\..\\bin\\Win32_Release\\mangosd.exe : fatal error LNK1120: 13 unresolved externals
========== Build: 10 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Link to comment
Share on other sites

Since back when my basic code was used for playerbot warrior I had an idea to make a very advanced pvp AI bot that learns from experience. I'm still working on it and speaking to some psychology professors from my university to see what best ways for pvp bot to learn are, as well as thought processes and others.

As far as my work is going right now, the pvp bot identifies "events" as either intervals of time, or scenario triggers (battle, death, killing blow, identify enemy(s)), and inserts them in seperate db i created in sd2 in table "ai_memory", with columns including LOTS of factors that define the "event", along with some kind of indication of whether a positive or negative outcome with the decision made. Based on searching through db from previous events (or after thinking of virtual memory and what happened from pvp bot decisions), the bot takes multiple params of his surroundings, hp, hp ratios, allies, etc etc. and makes thought process to see what to do (fight, retreat, support etc) based on all params.

Right now I'm working on trying to create a "mood" or personality almost that will alter decision making, creating flaws of being coward, or too cocky trying to rambo into a 1v5 battle after being on massive killing spree... and its annoying >.>

I've been researching AI for a bit and thought what better "test zone" than mangos. Only thing is this is not controlled via player, the ai will have a "mind of its own" almost. However its pathing is something I've yet to even think about, currently what i've got it doing is just mindlessly roaming around set waypoints within warsong and so far recording some information on its surroundings.

Maybe though it can be implemented in your system as soon as I have some working copy able to release :/

Link to comment
Share on other sites

  • 1 month later...
  • 5 months later...

Hi all!

A new version is available on the github. The url and branch (ai) are the same. An except of new features:

  • improved bot ai (at a cost of more cpu usage)
  • more than 15 new chat commands (whisper help or anything invalid to get a list)
  • more than 5 new strategies
  • configuration of visibility bot ranges
  • linux build fixed
  • improved looting and questioning (e.g. verbose objective tracking)
  • better bot movement (thanks for spline movement!)
  • untyped strategies (idea is to move them out of C++ code to some kind of scripting)

The ai branch also contains alternative ahbot branch which can be disabled in configuration. The only difference from the original one is that it records auction activity and uses it for pricing, so items that people buy often will go high in price.

Still no PVP support (currently out of scope). DK class is not covered by strategies. cppunit tests are not available in linux.

Link to comment
Share on other sites

  • 5 weeks later...
  • 3 months later...

Hi,

Awesome mod, but there is one slight issue with the git merge.

Looks like the repo has WoW Armory mod tied to it. It reflects the merge of WoW Armory into Mangos Core and then if you do not install the WoW Armory databases it prevents character deletion.

Log Output:

2011-12-26 03:04:59 SQL: DELETE FROM armory_character_stats WHERE guid = 9

2011-12-26 03:04:59 SQL ERROR: Table 'characters.armory_character_stats' doesn't exist

2011-12-26 03:04:59 SQL: INSERT INTO armory_character_stats (guid, data, save_date) VALUES

(9, '9 0 25 0...

~

2011-12-26 03:04:59 SQL ERROR: Table 'characters.armory_character_stats' doesn't exist

Other than that.. sweet mod! :)

Tried backing out the patch after git'ing wow armory, but it fails. So it's either a create a new patch, a manual remove, or apply the characters.sql from wow armory to the characters db. I opted for the easier route and applied the characters.sql.

Link to comment
Share on other sites

Yep, the armory is some raw decision.

@Akuba. Movement to target is somewhat fixed. Please try to set AiPlayerbot.ReactDelay=100. This will make bots quicker to reflect target movements. But of course there is a lot to do in movement space, e.g. some positioning strategies other than stay circle and follow master. stay line, stay combat and others are broken unfortunately.

I am still not able to make bots use transports like boats.

Also something is wrong with follow movement generator in core (bots cannot follow master in places like Dalaran), so I switched to XYZ-based movement.

Currently bot AI is able to kill only the first boss in 25-man raids or some high level heroics with 24-bots in group. For others better strategies are required. :(

Link to comment
Share on other sites

@ike3

I recompiled with the jan03 changes and ran into this:

src/game/playerbot/strategy/actions/BankAction.h:18: error: extra qualification ‘ai::BankAction::’ on member ‘FindItemInBank’

I think this is the fix for Linux, I am just starting to learn C++, so not 100% sure.

// Item* BankAction::FindItemInBank(uint32 ItemId);

Item* FindItemInBank(uint32 ItemId);

The code compiled, but I have not yet tested.

Link to comment
Share on other sites

Thanks for pointing out! Just pushed the fix on the github.

Also some new features are available:

  • potions strategy - use mana and healing potions when it is a touch time
  • conserve mana strategy - do not cast debuffs and other mana-consume spells if the target is almost done
  • cast time strategy - do not cast long spells if target is almost done
  • a set of triggers implemented for melee shaman, heal druid, dps warlock, etc.
  • enchant spells fixed for offhand weapon (i.e. shaman windfury weapon, etc.)
  • item use fixed (warlock now conjure and use stones again)
  • fleeing fixed, so bots do not wander but flee out of enemy
Link to comment
Share on other sites

Some useful macros I use for bot testing (I tried to create an addon but have no progress yet):

login all bots (they must be in the guild)

/s .bot add account1,account2,...

logoff all bots

/s .bot remove account1,account2,...

login all bots from my group

/s .bot add *

logoff all bots from my group

/s .bot remove *

leave the group

/g leave

Pull mobs by the tanks (/gr requires chatter addon, can be replaced with /p or /r if you have party or raid)

/gr @tank co -passive

/gr @tank nc -passive

/gr @tank d attack my target

Attack my target

/gr d attack my target

Flee with me (do not attack anything)

/gr reset

/gr flee

Follow me

/gr reset

/gr follow

Grind (attack anything, loot and repeat)

/gr grind

Follow in square shape (like a soldier batalion)

/gr nc +stay line,-passive

/gr do stay line

Loot everything

/gr do add all loot

Toggle passive mode (do not attack anything)

/gr nc ~passive,?

Stay in place (but attack and assist)

/gr stay

Stay circle (melee bots in center, ranged on the edge)

/gr @ranged co +stay circle,-passive,?

/gr @ranged do stay circle

Drop totems (toggle)

/gr @shaman nc ~totems,?

Attack the weakest target

/gr co +attack weak

Attack target based on threat

/gr @tank co +tank assist

/gr @dps co +dps assist

AOE mode

/gr @tank co +tank aoe

Reset bots to their default strategies

/gr reset

/gr reset ai

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use