AI too dumb to use colored gates/keys?

Maps and the art of mapmaking.
myythryyn
Assassin
Assassin
Posts: 293
Joined: 05 Sep 2006

AI too dumb to use colored gates/keys?

Unread postby myythryyn » 18 Apr 2007, 19:45

Hello, im making a smaller size map with three computer AI players.
i put colored barrier gates to block off each players area.

in this one test i did, i played up to month 4, and none of the three AI players ever opened their colored gate, they just sat in their castle.

so i quit that test and started a second.
for the second test, i put the colored key tent right next to the AI town, and watched what the AI did. its month three now in this test, and none of the three AI players has gotten their key, and so they havnt opened their colored gate.

is the AI too dumb to know how to use colored keys?
can anyone recall in any map they have played seeing the AI open a colored gate?
should i just not bother with colored gates?

User avatar
Angelspit
CH Founder
CH Founder
Posts: 6716
Joined: 18 Nov 2005
Location: Angelspit
Contact:

Unread postby Angelspit » 18 Apr 2007, 19:58

I had the same feeling for quite a while, but didn't bother testing it. It would be a shame... again.

Neckie
Peasant
Peasant
Posts: 67
Joined: 05 Oct 2006
Location: Quebec, Canada

Unread postby Neckie » 18 Apr 2007, 21:42

You should try to add AI attractors.

I've used them in my map to make sure they don't waste turns on my new buildings.

You can even use AI attractors in a multiplayer map. Just add them in the tree and not in the script.

myythryyn
Assassin
Assassin
Posts: 293
Joined: 05 Sep 2006

Unread postby myythryyn » 18 Apr 2007, 22:58

AI attractors can be used in multiplayer maps?
in the properties tree?
you mean just like how you would set up pointed lights for instance, you would set up an AI attractor/

what settings do you use? could you give an example?
the test i did with the AI attractor script command in a map i made did not go well. It seemed to do nothing on the highest priority setting. the AI still wandered around not carring about the object which was a player controlled town.

but, the question is, even if you set the AI attractor to the highest priority on a colored gate, will the AI even know how to open the gate?
has anyone ever seen the AI open a colored gate?

Neckie
Peasant
Peasant
Posts: 67
Joined: 05 Oct 2006
Location: Quebec, Canada

Unread postby Neckie » 19 Apr 2007, 02:02

In the Map property tree -> players -> (number) -> attractors

You can select the AI type (builder, warrior or explorer) just like in other Homm games. (dunno if they actually works)

I haven't tested those myself since I'm very very busy right now but someone told me it worked with his multiplayer map and that it kinda saved its map. The attractors in the tree works just like the ones in the script. But are called at the start of the map.

I really really doubt you can make the AI do something they wouldn't normally do (like open gates) but for sure you can make them go somewhere you want on the map... but you can't count on them to actually make the AI do what you want him to do there.

That said, it is worth trying. I really don't think that AI can go through gates... but they do visit the tents to get the key. So, maybe you could make them want something behind the gate so that the only way to reach it is to pass by the gate.

myythryyn
Assassin
Assassin
Posts: 293
Joined: 05 Sep 2006

Unread postby myythryyn » 19 Apr 2007, 03:50

ok so with some further testing, i have discovered i am wrong.

the AI does know how to open colored gates.

i created a tiny small test map with the whole map blocked off except a path between two towns.
I put a blue tent near the AI town, and a blue gate between the two towns. the AI opened the gate.

so i wonder why by month four the AI on my map hasnt opened the colored gates that would allow it to further explore the map.
why the AI is just sitting in its starting area doing nothing.
i can only think that perhaps there isnt enough motivation for the AI to open the gates. Maybe ill have to put a town close by on the other side, or something else to make the AI want to open the colored gates. i guess you have to give the AI a reason.

because that leads into my next problem. the AI attractor. I just cant get it to work. I went into the map properties, and created an attractor. I used X, Y co ordinates and a value of two, which is supposed to be "valued equal to winning the game".
what i did was on my test map i created a second path in the opposite direction of the pathway to the players town.
i then set to the attractor to that spot. The AI instead chases my hero, and does not even make any attempt to go to the location i have chosen for the attractor.
now if i could get the AI attractor working, maybe then i can get the AI to open those colored gates.

User avatar
Vlaad II
Demon
Demon
Posts: 318
Joined: 06 Jan 2006
Location: HC

Unread postby Vlaad II » 19 Apr 2007, 12:10

I know this is not what you asked for, but if nothing else helps... The AI uses Instant Travel to pass Border Gates, and it uses it well.
Cartographer - maps and mapmaking

User avatar
Grumpy Old Wizard
Round Table Knight
Round Table Knight
Posts: 2205
Joined: 06 Jan 2006
Location: Tower Grump

Unread postby Grumpy Old Wizard » 19 Apr 2007, 15:31

Allowing the AI to use instant travel can greatly slow down the AI's turns however. If you can't make the computer to consistantly open the border gates another option may be to place fixed creature stacks or garrisons that are of the size that you estimate the computer will have sufficient power to defeat in the time frame you want him to break out of his area.

If those positions are computer only then maybe placing some magi huts that reveal a path to playable positions would help?

I think also that if the computer can see the player from his castle (like his castle and the player's castle being separated only by a mountain) that he is less agressive and tends to stay in his castle to defend it.

I think the computer knows what stacks will join it so placing always join stacks behind stacks it has to fight would be one way to increase his troop strength as time goes on since you can't use scripting to do it. However, that may backfire and give the player free troops if the computer doesn't pick the stack up.

Here's another idea that I just though of. If it is a computer only position you are worried about give him a wand of instant travel. The wand only holds a set number of charges at a time so he couldn't slow the computer down for too long. Maybe have the wand guarded so he doesn't get it immediately. The player or computer may be able to jump into areas you don't want him to though if you don't take care.

Anyways, there are some things to experiment with.

GOW
Frodo: "I wish the ring had never come to me. I wish none of this had happened."
Gandalf: "So do all who live to see such times but that is not for them to decide. All we have to decide is what to do with the time that is given to us."

User avatar
rdeford
Assassin
Assassin
Posts: 299
Joined: 17 Apr 2007
Location: Sequim, USA
Contact:

Unread postby rdeford » 19 Apr 2007, 18:10

Thanks GOW. These are good ideas to experiment with.
rdeford, Mage Of Soquim

“Forgiving and being forgiven, loving and being loved,
living and letting live, is the simple basis for it all."

Ernest Holmes 1984

myythryyn
Assassin
Assassin
Posts: 293
Joined: 05 Sep 2006

Unread postby myythryyn » 21 Apr 2007, 05:11

Grumpy Old Wizard wrote: another option may be to place fixed creature stacks or garrisons that are of the size that you estimate the computer will have sufficient power to defeat in the time frame you want him to break out of his area.
thats actually what i first tried, and i guess the trick is "sufficient power".
I at first put 2 lvl 4 stacks, and 2 lvl 6 stacks between one player zone and another. Its a normal sized map, and somehow the AI with its magical player detection power bulldozed through all the gaurdians in just the fourth week. I have no idea how it got past lvl 6 stacks so early. The AI wiped out all the other AI players shortly after.
so then i put lvl 7 gaurdians. It slowed the AI down a couple weeks, but still didnt stop it. So then i put lvl 6 with a base number of 20-30 units. Then the AI didnt do anything but stay in its castle, so i guess the gaurdians were too strong. so then i just gave up and put colored gates.

Grumpy Old Wizard wrote:
If those positions are computer only then maybe placing some magi huts that reveal a path to playable positions would help?
I think also that if the computer can see the player from his castle (like his castle and the player's castle being separated only by a mountain) that he is less agressive and tends to stay in his castle to defend it.
the four playable factions can be human or computer. I agree the one thing ive learned is that you have to convince the AI to do anything by leaving a trail of cookies so to speak. If any objective is too far, or the path too complicated, the AI does nothing. So you have to give the AI easy to path objectives and lead it where you want. And the AI is a coward too, and it will only attack if it thinks it has a complete chance of winning. for instance, i put neutral towns near the colored gates to lure the AI out. I at first put a stack of creatures outside the town, but the AI wasnt interested in the town. so then i removed the creatures, and then the AI went for the town.
So i guess the AI isnt too dumb to use colored gates, its just stubborn and lazy.
Grumpy Old Wizard wrote:
I think the computer knows what stacks will join it so placing always join stacks behind stacks it has to fight would be one way to increase his troop strength
actually ive been watching the AI, and i have placed joining troops, but the AI never picks them up till after weeks have passed. Maybe the AI doesnt know that they are joining, but i think its probably more that the AI doesnt feel it needs them, just like how it leaves treasure and resources behind.
Grumpy Old Wizard wrote:
Here's another idea that I just though of. If it is a computer only position you are worried about give him a wand of instant travel.
that is an interseresting idea, but the wand can be recharged, and all the positions are playable, so i dont want to remove the mage guilds.

what i really would like to figure out though is the AI attractor. that most likely would solve alot of my problems of the AI sitting around doing nothing. have you GOW, or anyone been able to get the AI attractor to work?

User avatar
Grumpy Old Wizard
Round Table Knight
Round Table Knight
Posts: 2205
Joined: 06 Jan 2006
Location: Tower Grump

Unread postby Grumpy Old Wizard » 21 Apr 2007, 08:14

I tried an AI attractor in Seize The Throne, but could not get it to work. I wound up just giving the second town for the AI to him because he refused to capture it even with the attractor set to the maximum setting.

I don't have any more ideas at the moment for making the AI do what you want it to do in multiplayer mode.

Something to think about is that when playing multiplayer the main opponent is the human player anyways.

When playing a multiplayer map in single player mode I believe that all scripts do work (haven't tried it myself.) So you might want to do a little scripting to make the AI more challenging in single player mode.

GOW
Frodo: "I wish the ring had never come to me. I wish none of this had happened."
Gandalf: "So do all who live to see such times but that is not for them to decide. All we have to decide is what to do with the time that is given to us."


Return to “Mapmaking Guild”

Who is online

Users browsing this forum: No registered users and 5 guests