- Joined
- Mar 13, 2018
- Messages
- 7,745
- Thread Author
- #1
This is a pretty basic question, but still new to bot structure so forgive me.
I understand the basic structure of a treebot (it's a tree), and the concept to only execute one action per bot iteration. This raises the question though of how to properly perform a string of tasks when a condition is met. Something to do with states?
For example, if I made a simple tree bot to pick up bones until I have a full inv and then bury them all, I'd imagine a simplified tree structure to be:
full inv?
1. full inv? true -> bury one bone -> success
2. full inv? false (we're at 27) -> pick up a bone
3. full inv? true -> bury one bone -> success
4. repeat forever alternating between 27 and 28 bones
There's definitely a problem with my logic here but I'm not sure what the logic should look like.
I understand the basic structure of a treebot (it's a tree), and the concept to only execute one action per bot iteration. This raises the question though of how to properly perform a string of tasks when a condition is met. Something to do with states?
For example, if I made a simple tree bot to pick up bones until I have a full inv and then bury them all, I'd imagine a simplified tree structure to be:
full inv?
- T: bury bones branch (all bones at once)
- F: find bone nearby branch (eg. find bone, if found pick it up if not walk around, etc)
1. full inv? true -> bury one bone -> success
2. full inv? false (we're at 27) -> pick up a bone
3. full inv? true -> bury one bone -> success
4. repeat forever alternating between 27 and 28 bones
There's definitely a problem with my logic here but I'm not sure what the logic should look like.