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

Add civ ai #572

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

Add civ ai #572

wants to merge 7 commits into from

Conversation

nmkataoka
Copy link
Owner

Fixes: #512

Checklist

  • PR is of reasonable size

- Removed the wip folders `behavior-tree` and `AgentNew`. I was
  trying out some stuff like a hooks api but decided it's simpler and
  better (cost benefit ratio) to just clean up what I have already
- Refactored ProcRule to have less code, simpler code, more readable
  code. Still need to refactor all its usages
- Deleted a lot of code related to old combat ai attempts. When we hit
  combat we'll want to start over from scratch so there's no point in
  hanging onto this code and maintaining it for compilation.
- Simplified ProcRule to use ES6 class and have less clutter in it.
- ProcRules will now be classes that extend ProcRule and BoundAction
  will be an instance of ProcRule.
- Moved 'node' library from `react-ecsal` into `engine` since the
  cached queries will be useful for the ai system.

TODO: I expect to skip Considerations/Conditions for this PR since
I don't need them yet.

Refs: #512
- Fixed AgentSys to work with new ProcRule class
- Created `Idle` action with new ProcRule class
- Cleared out defunct code in `AgentSys.getNextAction`

TODO:
- Now need to implement new utility AI logic in `getNextAction`

Refs: #512
- Added expected utility and risk and considerations to the ai system
- Refactored AgentSys to clean things up and be able to handle this
- Added immutable query (node.ts) support to the ai system
- Updated proc rule database to handle new style
- Started creating CreateTown action for civs to use

Refs: #512
- Haven't touched this code in months, so I don't remember what's
  going on. Something to do with creating towns in civ ai
- Added political overlay during world gen
- Added overlay buttons so you can toggle political overlay on and off
- Shared code between political overlay in civ scene and world gen
- Added override so we can lock political overlay to show in civ scene
  since we don't have toggle buttons there yet

Re: #512
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

Successfully merging this pull request may close these issues.

Add Civ "AI" that chooses where to place towns each year
1 participant