-
Notifications
You must be signed in to change notification settings - Fork 53
Bot Architecture
Player Bots
Bots operate by executing Activities using Actions, requiring Facts and a Navigation system.
Activities are high-level goals for bots.
- Capacity - Number of bots that can do this activity at any given time
- Requirements - Facts required to be considered for this activity
- Resolvables - Facts which can be resolved prior to starting an activity
- Actions - How to complete the activity
- Products - Facts that become true after successfully completing an activity
Resolvers are special kinds of activities which are automatically executed when a resolve-able requirement is unmet.
E.g. acquiring items from banks or shops, moving to a location, preparing equipment and load outs.
Facts are piece of state represented in the game world about a bot. They are used either as conditionals e.g. requires 15 woodcutting, or outcomes of an activity or resolver e.g. produces oak_logs
Facts are reuse across activities, resolvers and navigation to avoid duplication.
Instructions are how player entities are controlled by player's clients and is also the base way that bots control their players too.
Actions are small behaviours which the bot can perform.
- Wait(ticks)
- Fight(target)
- GoTo(area)
- GoToNearest(areaTag)
- InteractNPC(option, npc)
- InteractObject(option, object)
- InteractPlayer(option, player)
- InteractFloorItem(option, item)
- InterfaceOption(option, npc)
The BotManager is responsible for:
- Maintaining bot state
- Selecting activities to run
- Scheduling actions required by activities
- Tracking failures
The Navigation Graph is a simplified representation of the world which bots can use to efficiently plan how to walk between locations like cities.