IPB Style© Fisana

Jump to content


qBot (yet another AI)


  • Please log in to reply
244 replies to this topic

#101 ac892006

ac892006

  • Community Members
    Pip

  • Discens
    (30 posts)

Posted 25 November 2011 - 01:52 PM

View PostPureon, on 24 November 2011 - 12:39 AM, said:

I recorded a video showcasing qBot's new defense:


The guys are still working on AI improvements for Alpha 8 release, but even now the AIs are looking very promising.
While defense is impressive the defeat was largely due to a flawed strategy . You can defeat qbot with half the no of units Simpley don't attack structures directly instead just use siege weapons to take down one tower at a time systematically and eventually the main civ center . What you did was to throw a huge number of units at qbot's main civ center . You went deep into its territory without destroying most of the towers hence the defeat .

#102 Android_

Android_

  • Community Members
    PipPip

  • Sesquiplicarius
    (127 posts)

Posted 25 November 2011 - 02:29 PM

View PostMythos_Ruler, on 24 November 2011 - 03:00 AM, said:

This will of course change once we implement Settlement Phases (Ages).
On the concept of Ages. I was thinking that maybe instead of simply copying AoE's Age concept you could add a little twist to that:

It is obvious that some sort of über-techs like Ages should be implemented as they let the player advance through the course of a match. However, instead of recycling the concept of a handful of Ages that unlock a huge range of techs and units across the board, it would possibly be cooler to have certain techs that are meta-techs as well but that unluck only a specific branch of new techs/units, e.g. something like 'iron smelting' for a range of military improvements/units, something like 'geography' for trade, diplomacy and scouting. 'Iron smelting' could be followed by 'Marian reforms' (or a more multicultural name, whatever) that enables the next line of military improvements/units, and so forth. Units/buildings could visually show improvements when you have researched an über-tech that affects them ('iron smelting' may change the appearance of military units, but not of buildings; for, say, 'masonry' [possibly unlocking building improvements/new buildings] it would be the opposite).

This way you could have more über-techs than 'just' four Ages (each being a bit cheaper than Ages of course), say ten or so, allowing the player to specialize in some fields over the course of the game, and it'd emancipate 0AD from AoE as well :). Key to this would be simplicity though; avoid cross-references in the techtree, clearly indicate the techs/units that will be unlocked by each über-tech, etc.

Has there already been a discussion on Ages etc. so far?

Edited by Android GRRR, 25 November 2011 - 02:34 PM.


#103 Pureon

Pureon

  • 0 A.D. Art Team

  • Primus Pilus
    (3,220 posts)

Posted 25 November 2011 - 02:54 PM

View Postac892006, on 25 November 2011 - 01:52 PM, said:

While defense is impressive the defeat was largely due to a flawed strategy . You can defeat qbot with half the no of units Simpley don't attack structures directly instead just use siege weapons to take down one tower at a time systematically and eventually the main civ center . What you did was to throw a huge number of units at qbot's main civ center . You went deep into its territory without destroying most of the towers hence the defeat .

ac892006 I agree with you, but I was aiming to showcase qBot's new garrison defense ability, not show everyone how amazing I am at hurling rocks ;)

Here's a full singleplayer gameplay video against qBot:


(viewed best in HD)
Pureon
0 A.D. Designer / Texturer / 3D Artist
Contact email:
pureon{@}wildfiregames.com

#104 quantumstate

quantumstate

  • WFG Programming Team

  • Primus Pilus
    (1,072 posts)

Posted 25 November 2011 - 08:54 PM

View PostMythos_Ruler, on 24 November 2011 - 03:00 AM, said:

I think the bots need to put up new expansions by the 10 minute mark. Then every 5 minutes after that.

I tend to prefer doing things based on situation rather than time, so if it has been attacked early it doesn't spend resources uselessly on tactical expansions but I can aim to have to happen at about the 10 minute mark for a typical game. Where do you think would be good for the placement of the expansion? Aiming for resource concentrations is the obvious thing, but how far away should they be. Do you aim to keep a continuous area of territory or aggressively build near the enemy to restrict them more?

Also I have recently committed two significant military improvements. Now qBot will retaliate when you attack its offensive troops so you can't just ambush its troops easily like before. Also I put in some path randomization code so the assault could come come from any direction.

Jonathan Waller [ aka quantumstate ]

Wildfire Games AI Scripter
Contact me: jonathanmarkwaller at gmail dot com


Support Wildfire Games!


#105 JuliusColtranePille

JuliusColtranePille

  • Donator

  • Sesquiplicarius
    (120 posts)

Posted 25 November 2011 - 11:39 PM

View Postquantumstate, on 25 November 2011 - 08:54 PM, said:

Also I have recently committed two significant military improvements. Now qBot will retaliate when you attack its offensive troops so you can't just ambush its troops easily like before.

sounds like a good improvement. but i don't understand it exactly:

will qbot attack shortly after you've defended yourself against his offensive troops? or will he always keep some defending troops at his base?

thx!

lookin forward to the final version for alpha 8 ;)
"Jazz means Freedom."

Miles Davis

#106 Pureon

Pureon

  • 0 A.D. Art Team

  • Primus Pilus
    (3,220 posts)

Posted 26 November 2011 - 12:38 AM

View PostJuliusColtranePille, on 25 November 2011 - 11:39 PM, said:

sounds like a good improvement. but i don't understand it exactly:

will qbot attack shortly after you've defended yourself against his offensive troops? or will he always keep some defending troops at his base?

When it sends it's attacking force towards the enemy base, the attacking force defends itself if attacked - what happened before is it would just continue to walk along while all it's troops were being killed until none were left.


I tested the latest version - it attacked me very early and then built up a very large infantry force and attacked me from 2 different angles. It also built a fortress in the middle of the map, and used it's expanded areas to build scout towers and economic buildings. Good to see!
Pureon
0 A.D. Designer / Texturer / 3D Artist
Contact email:
pureon{@}wildfiregames.com

#107 plumo

plumo

  • 0 A.D. Art Team

  • Centurio
    (798 posts)

Posted 26 November 2011 - 01:17 PM

"Check for resource accessibility, stops the game lagging due to too many pathfinder requests." :cheers:

Notable improvement? I hope the FPS hiccups decrease :)
B. Guns [aka Plumo]
0 A.D. Community Liaison
Contact email: plumo@wildfiregames.com

#108 quantumstate

quantumstate

  • WFG Programming Team

  • Primus Pilus
    (1,072 posts)

Posted 26 November 2011 - 02:22 PM

View Postplumo, on 26 November 2011 - 01:17 PM, said:

"Check for resource accessibility, stops the game lagging due to too many pathfinder requests." :cheers:

Notable improvement? I hope the FPS hiccups decrease :)

This does not generally improve performance, it removes extremely bad performance in certain unusual cases. Performance shouldn't be too bad currently, in late game I find that the pathfinder is more significant. Also performance should be improved by a new API fairly soon.

Jonathan Waller [ aka quantumstate ]

Wildfire Games AI Scripter
Contact me: jonathanmarkwaller at gmail dot com


Support Wildfire Games!


#109 infyquest

infyquest

  • Community Members
    Pip

  • Discens
    (48 posts)

Posted 26 November 2011 - 11:58 PM

I see a bug in the new module.
Sometimes the qbot|s army becomes stuck or idle
thez are not assigned to attac or gather

#110 quantumstate

quantumstate

  • WFG Programming Team

  • Primus Pilus
    (1,072 posts)

Posted 02 December 2011 - 02:22 PM

qBot is now in svn. Unfortunately due to me being rubbish with svn I managed to commit it with no commit message. I will post an update of what features are planned soon.

Jonathan Waller [ aka quantumstate ]

Wildfire Games AI Scripter
Contact me: jonathanmarkwaller at gmail dot com


Support Wildfire Games!


#111 Mythos_Ruler

Mythos_Ruler

  • 0 A.D. Project Leader

  • Megas Philhellene
    (13,782 posts)

Posted 02 December 2011 - 02:54 PM

View Postquantumstate, on 02 December 2011 - 02:22 PM, said:

qBot is now in svn. Unfortunately due to me being rubbish with svn I managed to commit it with no commit message. I will post an update of what features are planned soon.
20 lashes for you!
Michael D. Hafer [aka Mythos_Ruler]

Wildfire Games Project Leader
Contact me: michaeldhafer[at]gmail.com
Support Wildfire Games!


0 A.D.

#112 historic_bruno

historic_bruno

  • WFG Programming Team

  • Primus Pilus
    (1,923 posts)

Posted 02 December 2011 - 10:10 PM

Hmm I think Atlas needs a "default" AI setting in the player panel, so that it doesn't always manually set the AI. It's going to be a pain to update all the maps if we want qBot as default :( The intent was that it would only set the AI if the map designer explicitly wanted that, and usually player_defaults.json would be used for default player settings, but that's not how it works now.
Ben Brian [ aka historic_bruno ]

Wildfire Games Programmer
Contact me: ben@wildfiregames.com

#113 Mythos_Ruler

Mythos_Ruler

  • 0 A.D. Project Leader

  • Megas Philhellene
    (13,782 posts)

Posted 03 December 2011 - 05:56 AM

View Posthistoric_bruno, on 02 December 2011 - 10:10 PM, said:

Hmm I think Atlas needs a "default" AI setting in the player panel, so that it doesn't always manually set the AI. It's going to be a pain to update all the maps if we want qBot as default :( The intent was that it would only set the AI if the map designer explicitly wanted that, and usually player_defaults.json would be used for default player settings, but that's not how it works now.
Agreed. That would be good.
Michael D. Hafer [aka Mythos_Ruler]

Wildfire Games Project Leader
Contact me: michaeldhafer[at]gmail.com
Support Wildfire Games!


0 A.D.

#114 Ykkrosh

Ykkrosh

  • WFG Programming Team

  • Primus Pilus
    (4,869 posts)

Posted 03 December 2011 - 07:39 PM

View Posthistoric_bruno, on 02 December 2011 - 10:10 PM, said:

It's going to be a pain to update all the maps if we want qBot as default
All it should need is "sed -i s/jubot/qbot/ *.xml" which doesn't sound too much of a pain :)
Philip Taylor [aka Ykkrosh]

Wildfire Games Programmer
Contact me: philip@wildfiregames.com

#115 infyquest

infyquest

  • Community Members
    Pip

  • Discens
    (48 posts)

Posted 03 December 2011 - 09:31 PM

I have code snippet to sort the targets based on distance to the attack troops

the code change is below:

In the after the line 55 in attackMoveToCC.js, add the following lines

		//Sort targets based on distance
		targets = targets.toEntityArray().sort(function(a,B) {
				var pos = pending.getCentrePosition();
				return (VectorDistance(a.position(),pos)-VectorDistance(b.position(),pos));});

I have tested the code long back, please you also test this and commit

Edited by infyquest, 03 December 2011 - 09:32 PM.


#116 quantumstate

quantumstate

  • WFG Programming Team

  • Primus Pilus
    (1,072 posts)

Posted 03 December 2011 - 11:56 PM

View Postinfyquest, on 03 December 2011 - 09:31 PM, said:

I have code snippet to sort the targets based on distance to the attack troops

I have tested the code long back, please you also test this and commit

One thing I am not sure about is whether this is a good thing for the AI to do. Can you explain why you think it would be a good tactical decision? From my point of view there should be several attack modules, one should be a raider which targets economic units sending small groups especially early in the game, another should aim for training facilities to damage their military capacity and there should be an all out base destruction on which tries to flatten everything, aiming for the CC seems sensible for this since destroying it removes the territory, effectively forcing the defender to build a new one or surrender the base.

Jonathan Waller [ aka quantumstate ]

Wildfire Games AI Scripter
Contact me: jonathanmarkwaller at gmail dot com


Support Wildfire Games!


#117 infyquest

infyquest

  • Community Members
    Pip

  • Discens
    (48 posts)

Posted 04 December 2011 - 08:26 AM

currently we are targeting all the conquest critical buildings first
like CC, fortress, towers (not so sure),........

attack and destroy the nearest defensive building or CC or important building, then go for the rest.

deplete the defenses, then military buildings and CC to last

#118 Almin

Almin

  • Community Members
    PipPip

  • Sesquiplicarius
    (165 posts)

Posted 05 December 2011 - 06:28 PM

Sorry for being a little bit out-of-topic, but I'd like to follow your development and maybe even learn a little bit or gain some experience. What IDE's or editors are you using?
sry for my english

#119 quantumstate

quantumstate

  • WFG Programming Team

  • Primus Pilus
    (1,072 posts)

Posted 05 December 2011 - 10:59 PM

View Postinfyquest, on 04 December 2011 - 08:26 AM, said:

currently we are targeting all the conquest critical buildings first
like CC, fortress, towers (not so sure),........

attack and destroy the nearest defensive building or CC or important building, then go for the rest.

deplete the defenses, then military buildings and CC to last

This might be worth having, but the problem that I see with this is that static defenses are primarily designed to kill/slow down an enemy. So if you can get to the rest of the enemy base without being significantly damaged by the defenses then that means the enemy wasted effort/resources on defenses that were useless. Fortresses might be worth attacking because they also train units, the value of them as training facilities needs to be considered. So unless a defense is a threat to something we are trying to do (e.g. blocking the route into a base or encroaching on our own territory (I'm looking at you Pureon :sly:)) then we should avoid attacking them since we are wasting time which could be spent attacking more valuable targets.

View PostAlmin, on 05 December 2011 - 06:28 PM, said:

Sorry for being a little bit out-of-topic, but I'd like to follow your development and maybe even learn a little bit or gain some experience. What IDE's or editors are you using?

I use eclipse JS Helios (I found the latest version too buggy on linux) it has the best javascript code support of any IDE I have tried . You could use pretty much any editor you want and find most comfortable. I also quite like Geany.

Git is the most useful tool, using it with git gui is fairly straightforward and will help you keep up to date with the latest changes.

Jonathan Waller [ aka quantumstate ]

Wildfire Games AI Scripter
Contact me: jonathanmarkwaller at gmail dot com


Support Wildfire Games!


#120 quantumstate

quantumstate

  • WFG Programming Team

  • Primus Pilus
    (1,072 posts)

Posted 05 December 2011 - 11:25 PM

I thought it would be helpful to summarize future priorities for qBot, this is mainly a compilation of suggestions from people posted here (mainly Pureon). Currently I am prioritizing military improvements since the economy is fairly strong (also units look at the distance of a resource from a dropsite now, due to a recent change) relative to the military side. I think that military improvements should make it more fun to play against as well.

  • When defending it's territory, the defending soldiers walk all the way to the enemy base when enemy soldiers retreat. This is a bug in my code since I tried to fix it but it failed.
  • Starting cavalry/early trained cavalry are not used effectively. I plan to put in a form of economy raiding attack (though limited a bit to try and stop it form being annoying) which will use these. Also they could be used for meat gathering longer term.
  • The attacks should be less predictable, maybe sometimes the attacking force can divide into smaller groups, like Jubot does, and attack a number of targets. This has had some improvement with my new random attack directions code, target selection will be made more variable, especially with the new attack types planned. As you may have picked up I am of the opinion that splitting up offensive forces is a risky move that should be carefully considered so in some cases qBot might split its army but not often.
  • The AI should take more territory mid-late game - and push forward with a fortress or a few forward towers. It should aim to control the map and remove the resources available to enemies. This is a fairly big task to do well, consider it a long term goal.
  • Any starting resource treasures (those nearby the CC) should be gathered immediately, It could collect treasures throughout the map - these are an instant boost in resources. Infyquest is looking into this currently.
  • It appears to begin gathering metal and stone at the start, perhaps it should focus on food and wood to build a larger workforce. This is fairly minor, it should be improved but doesn't have too much of an impact currently.
  • Place structures in more suitable positions depending on their role. This is being worked on, I have written most of the enabling code for it. This should also help with multiple starting base maps where placement is pretty poor.
  • Use siege effectively. This would allow the bot to destroy bases much more effectively, will probably be a new attack module. This might help fend off tower rushes as well.

Jonathan Waller [ aka quantumstate ]

Wildfire Games AI Scripter
Contact me: jonathanmarkwaller at gmail dot com


Support Wildfire Games!





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users