Jump to content
Sign in to follow this  
quantumstate

qBot (yet another AI)

Recommended Posts

A minor suggestion, I notice qBot gets attacked by animals sometimes, but often the victim is a ranged unit that can never fight back because they have a minimum range and the animal is fast enough to take advantage with a melee attack. Anyway it looks very strange and always catches my eye :) Would it be possible to detect this and flee, or perhaps order a group attack? I guess this problem affects all ranged units really, so perhaps qBot should detect when a ranged unit has a melee unit attacking them within minimum range.

Not sure whether this is something qbot should do as much as UnitAI should do. At least the general part, imho ranged units should always try and get farther away from melee units than just to the minimum range limit. As it is now they move just enough to be able to shoot if the attacker stays in the same spot, but that doesn't work since the attacker is getting closer. I'd say ranged units should always try and get to say 75% of the distance between minimum range and maximum range when being attacked by a melee unit. The "order a group attack" part is something I agree the AIs should do though :)

Share this post


Link to post
Share on other sites

There is a huge exploit now to use against qBot that is crippling for it.

Right now, qBot garrisons all of its females and a lot of its soldiers whenever I send only a few soldiers into its base. This cripples qBot economically, as the units will remain garrisoned as long as I have my little raiding party in its base. Secondly, if a garrisonable building is already full, females will continue to crowd around this building and wait to be slaughtered by my men. Both behaviors are extremely damaging to the qBot player.

Share this post


Link to post
Share on other sites

There is a huge exploit now to use against qBot that is crippling for it.

Right now, qBot garrisons all of its females and a lot of its soldiers whenever I send only a few soldiers into its base. This cripples qBot economically, as the units will remain garrisoned as long as I have my little raiding party in its base. Secondly, if a garrisonable building is already full, females will continue to crowd around this building and wait to be slaughtered by my men. Both behaviors are extremely damaging to the qBot player.

I've noticed this too. Unfortunately qBot performed much better without garrisoning

Share this post


Link to post
Share on other sites

Right now, qBot garrisons all of its females and a lot of its soldiers whenever I send only a few soldiers into its base

I think AoK AIs would only garrison females locally after they were attacked (I'm not sure if you attacked or not) and it would never garrison soldiers. qBot could be smarter by doing both but only after it weighs the enemy's (local) strength with its own, if it's even close I'd say fight it out :)

Share this post


Link to post
Share on other sites

Garrisoning seems to be a tricky problem. I think one of the big problems at the moment is locality, it is currently garrisoning females when enemies get too close (line of sight distance), there seems to be a bug in the garrisoning code which causes them to not look for another building when the first gets full. Troops are just garrisoned when too many enemies get close to the base without any locality check. I will try making garrisoning more of a last resort for now, hopefully I can get females to move away from attackers but keep working.

The eventual plan for soldiers will be to have them garrison if the enemy is close to a defensive structure, and ungarrison as soon as the enemy move out of range. To make this effective the soldiers should try not to engage defensively until the enemy is threatening something vital but this is fairly long term. For now I guess removing garrisoning would be best in general.

Another thing which should help will be dynamic priorities, then the AI will train more troops if you have lots of troops, so it should be easier to fend off attacks. This will help defence but isn't directly relevant to garrisoning.

Share this post


Link to post
Share on other sites

When completed, your plans for building placement within the main base will also help garrisoning be much more effective - towers and fortresses will be at the front defending the civilian buildings at the back.

Share this post


Link to post
Share on other sites

Bug report: On Arcadia II set qBot as Player 1 (Hellenes), and yourself as Player 2 (Celts) - qBot does nothing, the starting units just stand in their starting positions. When I move an attack force into their territory, they garrison in the CC and only then begin working/building when they ungarrison. I've tried it 4 times, each time with the same result.

Share this post


Link to post
Share on other sites

Bug report: On Arcadia II set qBot as Player 1 (Hellenes), and yourself as Player 2 (Celts) - qBot does nothing, the starting units just stand in their starting positions. When I move an attack force into their territory, they garrison in the CC and only then begin working/building when they ungarrison. I've tried it 4 times, each time with the same result.

Thanks, this should now be fixed.

Share this post


Link to post
Share on other sites

Warning on Granicus River with qBot as player 2:

WARNING: JavaScript warning: simulation/ai/qbot/economy.js line 290 reference to undefined property supplies[resource]

(Also check out the weird unit movement of the AI on that map :))

Share this post


Link to post
Share on other sites

Warning on Granicus River with qBot as player 2:

WARNING: JavaScript warning: simulation/ai/qbot/economy.js line 290 reference to undefined property supplies[resource]

(Also check out the weird unit movement of the AI on that map :))

I think the warning is because there is no food on that map, I have added another check for that.

When I watch it the movement didn't seem especially strange. It isn't very clever at moving/fighting though, I never really designed it to handle that many troops. One thing which might look slightly strange is that when the formations stops it is actually told to move to its current position, this can lead to some units running back to reform the formation.

Edit: I think I have fixed Pureons error, I have been making fairly extensive changes to that section of the code so I can't commit it immediately though.

Share this post


Link to post
Share on other sites

I will be working on qbot in the next year.

This will be a hectic month for me, work, work and moar work :(

Hope it all goes well for you Infy

Share this post


Link to post
Share on other sites

I will be working on qbot in the next year.

This will be a hectic month for me, work, work and moar work :(

Hopefully you have a bit of time off over Christmas and it goes well. I'll look forward to having you back working on qBot :).

Share this post


Link to post
Share on other sites

I have just committed the last set of features before Alpha 8. See http://trac.wildfire...changeset/10755 for a list of the significant changes.

Garrisoning is disabled for now because of the issues it was causing and the defence should generally behave a bit better now, it seemed to have a few quirks before.

Updated. Playtested. Got AI warnings regarding troop strengths and such. And qBot never did raid me or attack me in force.

Share this post


Link to post
Share on other sites

Playteseted the new Code, too many Forts are being placed.

There is a build limit for Forts, Instead a scout tower needs to be placed,

If only the spot is near a verz important attack route then place the fort.

I will check other scenarios when I have time

Share this post


Link to post
Share on other sites

Very enjoyable :) It built defenses in front of the civilian buildings, it defended very well, it built a lot of fortresses, it attacked in a number of locations, it used the new Persian units effectively, generally it put up a strong fight. It didn't expand as much as it could, but the oasis map didn't have many resources outside it's starting base, which probably explains that.

Playteseted the new Code, too many Forts are being placed.

There is a build limit for Forts, Instead a scout tower needs to be placed,

If only the spot is near a verz important attack route then place the fort.

I will check other scenarios when I have time

I didn't mind the large amount of fortresses - however it did look like it was exceeding the build limit. Perhaps it builds too many defenses now and should attack more/earlier, but that could be something to work on for Alpha 9.

As Mythos said, debug warnings should be turned off. I did receive a few other warnings though: http://pastebin.com/0fS0dcmE

But overall, great :D

Share this post


Link to post
Share on other sites

Updated. Playtested. Got AI warnings regarding troop strengths and such. And qBot never did raid me or attack me in force.

I have simplified this code a bit, basically it raids for the first 6.5 minutes and then attacks as previously after that. The raids are random, it is possible that no raids happen at all, though I increased the probability a bit so that should be rare. I forgot to disable the debug messages before committing, they are disabled now :).

Playteseted the new Code, too many Forts are being placed.

There is a build limit for Forts, Instead a scout tower needs to be placed,

If only the spot is near a verz important attack route then place the fort.

I will check other scenarios when I have time

There was a bug in he check for building limits, <= instead of <. It builds forts on the most important (shortest) attack routes first and then just keeps going after that. Also I slowed the fortress building rate a bit.

Edit: Pureon: I have added another check into the attackMoveToLocation code, Hopefully this will stop the error you got, it seems to be a bit persistent.

Share this post


Link to post
Share on other sites

i know why it builds fortresses, coz its in the two lists the advanced building lists and the separate list for fortress.

We might need to remove it from advanced list

The advanced building list will only ever build one fortress. Have you observed the warning about build too many fortresses since my last commit? I should have fixed it there. The defensive building code is designed to build up to the build limit of 10 fortresses (at least on open maps) but it will take its time doing so.

Share this post


Link to post
Share on other sites

see the new config.js file and please post your comments

The config file is a good idea which we should implement. This should allow us to do nice things like making aggressive and defensive versions of the bot which can by easily switched between.

One thing to consider is that a lot of properties which should be configurable should also be dynamic. One possibility is allowing some functions to be defined in the config file. Making the config file too complicated does cause problems though.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...