JSON based AI

Any other ideas that does not fit to the specific categories.
Post Reply
User avatar
Sunrise Samurai
Posts: 2678
Joined: Thu Jun 18, 2015 11:21 pm
Location: Florida, U.S.

JSON based AI

Post by Sunrise Samurai »

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.
The glorious sun rises again
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: JSON based AI

Post by Stratego (dev) »

if you can figure out a format (how to tell things) i can implement the usage.
User avatar
Sunrise Samurai
Posts: 2678
Joined: Thu Jun 18, 2015 11:21 pm
Location: Florida, U.S.

Re: JSON based AI

Post by Sunrise Samurai »

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
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: JSON based AI

Post by Stratego (dev) »

it is not about the loook, it is about the data content.
User avatar
godOfKings
Posts: 3302
Joined: Fri Sep 22, 2017 4:50 pm

Re: JSON based AI

Post by godOfKings »

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
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
User avatar
Sunrise Samurai
Posts: 2678
Joined: Thu Jun 18, 2015 11:21 pm
Location: Florida, U.S.

Re: JSON based AI

Post by Sunrise Samurai »

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
User avatar
godOfKings
Posts: 3302
Joined: Fri Sep 22, 2017 4:50 pm

Re: JSON based AI

Post by godOfKings »

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
User avatar
Sunrise Samurai
Posts: 2678
Joined: Thu Jun 18, 2015 11:21 pm
Location: Florida, U.S.

Re: JSON based AI

Post by Sunrise Samurai »

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.
Attachments
skeleton.json
(3.09 KiB) Downloaded 109 times
The glorious sun rises again
User avatar
Lawrence
Posts: 190
Joined: Wed Oct 25, 2017 9:46 am
Location: On my way...

Re: JSON based AI

Post by Lawrence »

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!"
Post Reply

Return to “Others”