Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate fight-or-flight into second behavior stage #50

Open
gilmore606 opened this issue Aug 1, 2018 · 2 comments
Open

Separate fight-or-flight into second behavior stage #50

gilmore606 opened this issue Aug 1, 2018 · 2 comments

Comments

@gilmore606
Copy link
Owner

remove behavior.ForF()
when behaviors want to signal ForF, they return a special faux ActionForF() to go into the urgency election
if this action is picked, a new round of behavior picking happens
behavior.actionForF() is polled, urgency + status calculated by each behavior, highest picked

@gilmore606
Copy link
Owner Author

SelfDefend.actionForF() -- check actor.confidence() (looks at wounds vs hubris), set urgency opposite to confidence, return a flee action -- lower confidence if adjacent, lower if target has missile, lower by distance. can be over 1f if confidence not berserker-level and wounds high

Hitter.actionForF() -- if no melee weapon, null. if in hit range of target, Attack 1f, or equip melee 0.8f. else step toward target, urgency opposite to distance

Shooter.actionForF() -- if no missile, null. if in optimal range, attack 1f, or equip missile 0.8f. if out of range, step toward, urgency opposite to distance-from-range.

@gilmore606
Copy link
Owner Author

make ActionGoal("string", targetentity) which triggers the re-election of behaviors to get a real action, by asking their doGoal()

give up on ForF -- just have selfDefend or whatever decide right there (via its own params like aggression) whether to fight or flight, and return ActionGoal("fight") or ActionGoal("flee")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant