Map Database  •  FAQ  •  RSS  •  Login

AI city planner

<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 25 Mar 2012, 13:21

AI city planner

Krom has been working on a "city planner" for the AI. It's only just started and has lots of limitations/bugs but it's still nice to see the AI building things in the game :)
We'll probably release a video of it later on, when road connections are fixed and the AI places fields.

Here's a screenshot of a village made by the AI:
http://kamclub.ru/_fr/7/4517015.jpg

Just thought you guys might like to see the progress ;)
This doesn't mean there'll be a fully automated AI in the next release, there is still a lot to be done. (automated military is not even started yet)
Lewin.
<<

Jochi

Woodcutter

Posts: 16

Joined: 09 Mar 2012, 18:09

KaM Skill Level: Fair

Location: Spain

Post 25 Mar 2012, 14:44

Re: AI city planner

Very good job Krom. In the picture is you've done a great job. Anger and move forward, thank you very much for your effort. I look forward to the video
<<

Shadaoe

Knight

Posts: 584

Joined: 28 Jul 2011, 22:00

Website: https://www.youtube.com/user/KaMRemake

Post 25 Mar 2012, 16:56

Re: AI city planner

This is amazing :p
<<

Thomas

User avatar

Militia

Posts: 49

Joined: 17 Jan 2012, 09:43

KaM Skill Level: Average

Location: Germany

Post 26 Mar 2012, 08:15

Re: AI city planner

Really great job guys. I'm also looking forward to the video :)
<<

pawel95

Castle Guard Swordsman

Posts: 1912

Joined: 03 Oct 2008, 22:00

KaM Skill Level: Skilled

Location: "Pawel95" on Youtube.com

Post 26 Mar 2012, 14:47

Re: AI city planner

Really cool. Good job.
Maybe i will say it now and not later: If you program the builiding of the AI try to make "emergency exit´s" :D What I mean is, that in the SR 3 original KaM is it so, if you destroy one labour, while he makes a field of street or wine, at this place no labour will continue the work :-( and sometimes, all laboures stop building new houses, because of the one kill.

And sth other. is it possible maybe, to build 2 or 3 builiding at the same time (parallel) , because a human player will not build one house and build the next, if the first is finished!?


pawel95
<<

pavlos

User avatar

Militia

Posts: 46

Joined: 18 Oct 2011, 22:00

KaM Skill Level: Average

Location: Greece

Post 28 Mar 2012, 14:18

Re: AI city planner

Very Good job Lewin... you and Krom always be the top of the everest mountain
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 29 Mar 2012, 12:12

Re: AI city planner

@pawel95: These are the sort of bugs we would like to fix.

Killing a worker will not stop house construction by design. As with human player that will either abort the house plan and it will be recreated on next turn, or other workers will finish the house. Can not say the same about fields though - they are placed-and-forget about by the AI. Although certaqinly we can add a feature to monitor required fields/road-connections later on.

AI is already building 3 houses at once each time. We might make it a script command so you could set AI behavior more precisely (e.g. range 1..4 will allowed).

Thanks for response!
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

thunder

User avatar

Moorbach's Guard

Posts: 1044

Joined: 15 Apr 2012, 12:11

KaM Skill Level: Fair

Location: In the Market

Post 02 Jul 2012, 16:25

Re: AI city planner

Hello!
When i tested a map, i found two little things. Pictures show it. If needly, i can send to you replay.
Ai is a great job! I wasnt alone on the map. I hope you will continue the work on it and make weaponcreatorAI, armycreatorAI and battleAI.
Really good work!
Thanks!
t

lw.: it was happened only 2 times from 56 games what i played with AI.
(-Ai check the stone before start to built the roads
-if the buildings not grow up in x time(2-3mins) then take another place)

lwlw.:i dont know is my post good here? Sorry.
You do not have the required permissions to view the files attached to this post.
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 02 Jul 2012, 17:49

Re: AI city planner

It would be helpful if you could make a compilation of typical bugs AI has in this topic. 1 and 3 are common mistakes, but I did not knew no.2 happens. Are there any other mistakes AI does? Please add screens :)
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

FeyBart

User avatar

Knight

Posts: 402

Joined: 28 Dec 2011, 16:35

KaM Skill Level: Beginner

Location: Nutville, NL

Post 02 Jul 2012, 17:53

Re: AI city planner

Watching this all, I might want to test it out sometime.


Anyway, isn't there an AI made by someone else out there on the internet that has been tested before? Might save you a lot of work if you implement one of those.
Nice coffee is always nice.
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 04 Jul 2012, 07:24

Re: AI city planner

Anyway, isn't there an AI made by someone else out there on the internet that has been tested before? Might save you a lot of work if you implement one of those.
There are AI algorithms to do specific tasks like moving troops, but the KaM world is so specific that there is pretty much no generic AI that could function in it. Imagine taking the AI from say Age of Empires and putting it in KaM. It wouldn't understand about roads, food, weapons, etc. etc. Each game is unique so the AIs need to be written uniquely.
I mean, why would any generic AI on the internet be able to cope with KaM's road system?

Some modern AIs use a sort of "evolution" process to develop them, by running lots of simulations using different random parameters (e.g. building 5 stonemasons at the start or 3 stonemasons) and taking the best results (e.g. most resources, most soldiers after 1 hour) and then mixing (breeding) those algorithms together and repeating. After lots of generations apparently it gives good results, by selecting only the effective solutions. You can then end up with a set of parameters that you know are effective for certain situations, e.g. the simulation might tell you that in order to make the most troops it is best to build 4 stonemasons as soon as possible.
This is all quite a lot of work to set up and it still requires an AI framework, with some parameters to be tweaked. (which we don't have, the AI can only make a simple village at the moment) This is just what I've read about so I don't know if I've got all the facts right, but it sounds like it could work well. There's still a lot of work to go before we get near that stage.
<<

FeyBart

User avatar

Knight

Posts: 402

Joined: 28 Dec 2011, 16:35

KaM Skill Level: Beginner

Location: Nutville, NL

Post 04 Jul 2012, 11:46

Re: AI city planner

(...)
There are AI algorithms to do specific tasks like moving troops, but the KaM world is so specific that there is pretty much no generic AI that could function in it. Imagine taking the AI from say Age of Empires and putting it in KaM. It wouldn't understand about roads, food, weapons, etc. etc. Each game is unique so the AIs need to be written uniquely.
I mean, why would any generic AI on the internet be able to cope with KaM's road system?

Some modern AIs use a sort of "evolution" process to develop them, by running lots of simulations using different random parameters (e.g. building 5 stonemasons at the start or 3 stonemasons) and taking the best results (e.g. most resources, most soldiers after 1 hour) and then mixing (breeding) those algorithms together and repeating. After lots of generations apparently it gives good results, by selecting only the effective solutions. You can then end up with a set of parameters that you know are effective for certain situations, e.g. the simulation might tell you that in order to make the most troops it is best to build 4 stonemasons as soon as possible.
This is all quite a lot of work to set up and it still requires an AI framework, with some parameters to be tweaked. (which we don't have, the AI can only make a simple village at the moment) This is just what I've read about so I don't know if I've got all the facts right, but it sounds like it could work well. There's still a lot of work to go before we get near that stage.
No, I don't mean generic AIs. I meant, an existing AI designed for KaM. You guys aren't the only modders out there, so why wouldn't there be someone else who has made an AI for KaM already?
Nice coffee is always nice.
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 04 Jul 2012, 12:12

Re: AI city planner

No, I don't mean generic AIs. I meant, an existing AI designed for KaM. You guys aren't the only modders out there, so why wouldn't there be someone else who has made an AI for KaM already?
Actually we're not modders, we wrote the entire engine from scratch, we only reused the graphics, music, sounds, etc. ;) The original KaM engine and AI is embedded into the KM_TPR.exe file, it's not possible to mod it.

Some games use an engine that runs external "scripts" which means they can be modded. In KaM all of the AI code is in the source code of the game which has never been released so modding the engine is basically impossible.
<<

godest

User avatar

Lance Carrier

Posts: 63

Joined: 30 May 2012, 19:12

KaM Skill Level: Skilled

Location: Sweden

Post 04 Jul 2012, 16:50

Re: AI city planner

Its kinda sad it is like that, but not strange considering the age of the game. Im really looking forward to and hoping that the ai will be even better in the next version :D
A mage is never late - Gandalf
<<

FeyBart

User avatar

Knight

Posts: 402

Joined: 28 Dec 2011, 16:35

KaM Skill Level: Beginner

Location: Nutville, NL

Post 05 Jul 2012, 11:56

Re: AI city planner

(...)
Actually we're not modders, we wrote the entire engine from scratch, we only reused the graphics, music, sounds, etc. ;) The original KaM engine and AI is embedded into the KM_TPR.exe file, it's not possible to mod it.

Some games use an engine that runs external "scripts" which means they can be modded. In KaM all of the AI code is in the source code of the game which has never been released so modding the engine is basically impossible.
So you're basically saying the AI would be useless? That's too bad.
Nice coffee is always nice.

Return to “Feedback / Discussion”

Who is online

Users browsing this forum: No registered users and 14 guests