-
Notifications
You must be signed in to change notification settings - Fork 18
Population
The purpose of the population is to make the simulation agent-driven.
Each agent (also referred to as a "bot") acts individually through an intelligent task-queue system. This lets them interact with their world.
Chaining primitive tasks together lets them generate more complex behaviors, through intelligent parameterization. This is part of the underlying task-queue system that dictates the bot's emergent behavior.
The task-queue system is explained in detail on my blog here: https://weigert.vsos.ethz.ch/2019/03/08/modular-memory-driven-task-bots/
The bots are considered memory drive, as in they store information about their previous interactions with their world to inform their future actions.
In this sense, they are intelligent little machine learning units that interact with the simulation in specific ways.
Bots of course need stimuli, or they won't have anything interesting to interact with. Interesting behavior requires an intelligent actor, as well as a variety of things to act upon!!
Parameterization occurs with the generalized state object.
This specifies not only targets, but represents a generalized world state.
This is also what they store in their memory.
The state is measured from a bots perspective using their sensory capabilities, therefore always representing local and imperfect information (no actor has global information).
States contain information such as time, other agents, what they were doing, an object they were holding, where they were, etc.
Memories are stored inside a priority queue for each bot.
Memories store a recall score, so memories that are used more often retain their position in the queue.
The bots have a maximum queue size, so the oldest or least important memories are forgotten.
Memories containing a state vector thereby act as association between different aspects of an experience they had at the time of recording in their mind.
- Primitive Tasks for building complexity
- Response to Interrupts (interrupt flag setting)
- 3D Pathfinding (including approximate pathfinding, this is important!)
- Tasks can be associated with animations
- Tasks can be associated with sounds upon execution
Tasks are single-step operations, that can contain a queue of sub-tasks. Tasks are executed by completing the subqueue first (and thereby diving down recursively). A task is completed when its subqueue is emptied.
To-Do: List all tasks that have been implemented Also list tasks that have not yet been implemented!
Bots need to be able to: -> Prioritize Tasks -> Interject Tasks upon events -> Stop tasks upon events -> Restart tasks
This will be implemented with an intelligent task self-allocation scheme. Currently bots are simply allocated tasks, and thereby don't make decisions at all! I already have an idea for how this will work, but until I have implemented a successful test I will hold of on writing it here. This will probably be my next big blog article.
- Skills / Crafts related Tasks
- Economy Related Task
- Resource Management Related Tasks
- Inventory Management Tasks
- Combat Related Tasks
- Specific Movement Related Tasks (Crawling / Climbing / Swimming / etc.)
- Communication Related Tasks
- Memory Related Tasks
Here are some new task ideas: -> Make sure they are properly parametrized, so that we avoid duplicate stuff.
##Memory Oriented Tasks Task::dream - Wait and Think / Listen / Sleep Task::read - retrieve memories from Objects Task::write - add memory objects to books Task::inscribe - Write tasks to objects Task::interpret - Generate tasks from objects Task::research - High level tasks to collects lots of information on memory query
##Communication Tasks Task::tell - Write a memory to short-term memory and interrupt Task::listen - Write short term to long-term memory Task::ask - Mandate respond task with a query and interrupt Task::respond - Query state of task and tell to issuer Task::converse - Query Memory, construct converse mandate and interrupt (repeat until boredom)
##Mandate Management Tasks Task::decide - From list of possible tasks, sort them / manage and pick one Task::request - Give a mandate to somebody else in form of task Task::report - Report successful mandate execution to mandate issuer? Necessary?
##Group Management Tasks Task::join - Join a group in the hierarchy Task::promote - Move up in the hierarchy Task::leave - Leave a group
##Fighting Tasks Task::hit - Do a damage roll to adjacent bot Task::attack - Repeatedly follow and hit adjacent Bot (optionally following at distance) Task::steal - Rob somebody / Loot somebody? Tell them you robbed them (lol) and Set interrupt flag
##Inventory Management Tasks??? Task::seek Task::collect Task::take Task::convert
Task::consume Task::give Task::trade Task::store - Place in container somehow? (i.e. blocks have inventories) Task::retrieve - Get a certain quantity of a certain object?
##Resource Management Tasks?? -> Storage Handling -> Hauling -> Emptying -> Inventory Management -> Find / Collect Items to Inventory -> Forage Items -> Collect Resource from Block -> Requires Tools? -> Place Somewhere -> Clear an Area of Items / Blocks
##Economics Tasks? -> Request Items for Money -> Send Items to somebody remotely (messenger) -> Tax -> Hire a group collectively to do a task? -> Rob -> Balance Books -> Pay
##Skill Tasks? -> Craft Items -> Write Books / Research -> Cartography -> Navigate -> Transport Goods -> Ship Building -> Building Building -> Trapping / Fur Hunting -> Farming -> Smithing
All new tasks should be generalized and parameterized, so they can be used to generate more complex behavior. Alternatively, they can themselves be constructed purely from primitive tasks.
- Implement a group structure with land-ownership rights
- Group Internal Structure of Bots (members)
- Groups have purposes and can generate goals for the member bots
-> Books and Reading / Artifacts -> Can share information as well as mandate group creation with certain goals -> Example: The revolutionary communist rock (recruit everyone to kill a certain group) -> Tells people to find people of a certain type and mandates that they join (lmao) -> Groups: -> This means founding a group, creating a founding object, giving them a purpose, leaving groups, forging relations to other groups, etc. so that they can then interpret tasks from these groups. -> e.g. Groups with the "Recruit" Option will try to recruit other bots. But bots will need to look at their ideals and decide if they like it or not. This means bots need to be randomly generated with stuff they like and don't like.
Books: -> Bots can read memories from other bots about states, written on objects -> i.e. objects store memories, which are unchangeable -> bots can also record their memories in objects -> this means they can refer to them later if necessary -> This can also simply be instructions -> You can create a memory virus by telling bots to tell other bots stuff -> What if a memory contains a task handle and a state -> Then you can share a memory with a task handle and tell somebody to do it -> What if instead of always storing what we're doing in our memory, we write stuff down in diaries? -> Parse memories so books become readable for human eyes (i.e. we read what bots think / know) -> Parse Tasks so bot can describe actions / responsibilities
Higher Level: -> A bot should be able to randomly decide to walk to a place they read about in a book. -> Or look for someone they heard about in association with something and ask them -> This requires high-level tasks with recursive structures -> Research