Since most of the rest of the game has become easily configurable, I would like to propose making the ai just as easily edited. This would enable us to do most of the work in figuring out a better ai, as well as perhaps a few different basic strategies it could use.
Necessary tools include the ability to set weights to production of units and technologies, plus the ability to adjust those by a variety of factors, including turn number (to reduce the chances of things like light cavalry late game, plus raise the chances of technologies over time.) And the "best against me" tag. Terrain should also be a viable factor, both to prevent the ai making battering ram in "forest run" type maps (95% forest, so it can't move) and to encourage naval units and technologies in maps with say 50% or more water.
Also, we would need to dictate where the ai would build what, and in what order and what probability.
To distinguish between light and hard ai, maybe have a menu option titled "AI cheats" to dictate the ai getting it's usual advantages.
JSON based AI
- Sunrise Samurai
- Posts: 2678
- Joined: Thu Jun 18, 2015 11:21 pm
- Location: Florida, U.S.
JSON based AI
The glorious sun rises again
-
- Site Admin
- Posts: 15741
- Joined: Fri Apr 25, 2014 9:28 pm
Re: JSON based AI
if you can figure out a format (how to tell things) i can implement the usage.
- Sunrise Samurai
- Posts: 2678
- Joined: Thu Jun 18, 2015 11:21 pm
- Location: Florida, U.S.
Re: JSON based AI
Maybe Alexander could offer suggestions for a format. He's got more experience than I do with this. At a guess, it's probably going to look a lot like the sound selection JSONs.
The glorious sun rises again
-
- Site Admin
- Posts: 15741
- Joined: Fri Apr 25, 2014 9:28 pm
Re: JSON based AI
it is not about the loook, it is about the data content.
- godOfKings
- Posts: 3302
- Joined: Fri Sep 22, 2017 4:50 pm
Re: JSON based AI
i got some ideas to improve ai workers
if the the four adjacent tiles to a town is filled, for example with towers and factory building, then the workers will start building siege units in the next closest tiles to the town,
if the tile is forest then they will build siege mantlets,
if the tile is grass then their first priority will b battering rams, once they have at least three surviving battering rams then they will build catapults, and continue to build catapults until they have less than three battering rams at which time they again start building battering rams
if tile is water then, if enemy player has lots of infantry based units like archers, then ai will build galley, if enemy has lots of galley and transport ships, then ai will build triremes, even if player has only transpot ships then too ai will build triremes, if player has triremes, turtle ships or just about any other ship, then ai will build catapult ships
if the the four adjacent tiles to a town is filled, for example with towers and factory building, then the workers will start building siege units in the next closest tiles to the town,
if the tile is forest then they will build siege mantlets,
if the tile is grass then their first priority will b battering rams, once they have at least three surviving battering rams then they will build catapults, and continue to build catapults until they have less than three battering rams at which time they again start building battering rams
if tile is water then, if enemy player has lots of infantry based units like archers, then ai will build galley, if enemy has lots of galley and transport ships, then ai will build triremes, even if player has only transpot ships then too ai will build triremes, if player has triremes, turtle ships or just about any other ship, then ai will build catapult ships
There is no place for false kings here, only those who proves themselves to b the true kings of legend, or serves under me
For I watch over this world looking for those worthy to become kings, and on the way get rid of the fakes and rule over the fools
For I watch over this world looking for those worthy to become kings, and on the way get rid of the fakes and rule over the fools
- Sunrise Samurai
- Posts: 2678
- Joined: Thu Jun 18, 2015 11:21 pm
- Location: Florida, U.S.
Re: JSON based AI
I'm still looking for the ai to prioritize castles over towers, then build towers adjacent to factories if it gets that far. I also proposed building siege/ships in any available space adjacent to a worker, ensuring there's never nothing for workers to build.
The glorious sun rises again
- godOfKings
- Posts: 3302
- Joined: Fri Sep 22, 2017 4:50 pm
Re: JSON based AI
How do workers in aof build castles?
There is no place for false kings here, only those who proves themselves to b the true kings of legend, or serves under me
For I watch over this world looking for those worthy to become kings, and on the way get rid of the fakes and rule over the fools
For I watch over this world looking for those worthy to become kings, and on the way get rid of the fakes and rule over the fools
- Sunrise Samurai
- Posts: 2678
- Joined: Thu Jun 18, 2015 11:21 pm
- Location: Florida, U.S.
Re: JSON based AI
Possible model for json based ai. If we have a list of possible behaviors to apply for each unit/building, then assign priority modifiers based on various factors, such as opposing unit types or turn count, to give orders. Behaviors range from "produce x unit" for buildings to "build x object adjacent to y unit type" for workers, and "retreat to heal" for injured units or "maintain maximum range and attack" for ranged units.
The attachment is a Minecraft json for skeletons, and it includes the simple ai that controls them. Included are commands to attack, run, and avoid sunlight.
The attachment is a Minecraft json for skeletons, and it includes the simple ai that controls them. Included are commands to attack, run, and avoid sunlight.
- Attachments
-
- skeleton.json
- (3.09 KiB) Downloaded 113 times
The glorious sun rises again
Re: JSON based AI
This is great, maybe in the future we get the oppurtunity to choose AI for maps (recreating famous tactics)
Random guy: "Lets use goblins."
Me: "GOBLINS? THIS IS LAWRENCIAAAAA!"
Me: "GOBLINS? THIS IS LAWRENCIAAAAA!"