IPB Style© Fisana

Jump to content


qBot (yet another AI)


  • Please log in to reply
244 replies to this topic

#161 Mythos_Ruler

Mythos_Ruler

  • 0 A.D. Project Leader

  • Megas Philhellene
    (13,896 posts)

Posted 22 December 2011 - 06:26 PM

You're supposed to kill the camel. lol ;)

At any rate, I'd like to have an "Observer" option for multiplayer, so a person or two could watch a multiplayer match unfold. This would be great for learning and for tournaments.
Michael D. Hafer [aka Mythos_Ruler]

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


0 A.D.

#162 feneur

feneur

  • 0 A.D. Project Leader

  • Cartographer of imaginary worlds
    (7,090 posts)

Posted 22 December 2011 - 06:32 PM

View PostMythos_Ruler, on 22 December 2011 - 06:26 PM, said:

You're supposed to kill the camel. lol ;)
I guess that's one way to do things =) (Though, doesn't the "loss music" play throughout the entire game then? Not that it matters much, but anyway =) )

Erik Johansson [ aka feneur ]

Wildfire Games
Contact me: feneur@wildfiregames.com



Support Wildfire Games!


#163 Mythos_Ruler

Mythos_Ruler

  • 0 A.D. Project Leader

  • Megas Philhellene
    (13,896 posts)

Posted 22 December 2011 - 06:45 PM

View Postfeneur, on 22 December 2011 - 06:32 PM, said:

I guess that's one way to do things =) (Though, doesn't the "loss music" play throughout the entire game then? Not that it matters much, but anyway =) )
Right. I think we need proper "Observer" support.
Michael D. Hafer [aka Mythos_Ruler]

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


0 A.D.

#164 historic_bruno

historic_bruno

  • WFG Programming Team

  • Primus Pilus
    (1,980 posts)

Posted 23 December 2011 - 03:24 AM

qBot's trying to gather from enemy farms (as in sending dozens of females into enemy territory, where they just stand around a farm). I guess it needs to distinguish between player owned, gaia, and enemy resources when building its resource map?

Edit: I can't always reproduce this, I guess it depends on the map and game state, but still I think it would be a good fix, there's really no cause for qBot to ever send so many females to an enemy farm, and least of all when it's well defended :)
Ben Brian [ aka historic_bruno ]

Wildfire Games Programmer
Contact me: ben@wildfiregames.com

#165 Mythos_Ruler

Mythos_Ruler

  • 0 A.D. Project Leader

  • Megas Philhellene
    (13,896 posts)

Posted 23 December 2011 - 05:08 AM

qBot also sends tons of females into my base to gather from my chickens. lol
Michael D. Hafer [aka Mythos_Ruler]

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


0 A.D.

#166 hhyloc

hhyloc

  • Community Members
    PipPipPip

  • Duplicarius
    (200 posts)

Posted 23 December 2011 - 07:20 AM

The same happened to me, too. qbot sent several female citizens in an early rush to my base, accompanied by some troops.

#167 quantumstate

quantumstate

  • WFG Programming Team

  • Primus Pilus
    (1,086 posts)

Posted 23 December 2011 - 10:17 AM

I have put a territory check into the resource finding code so this shouldn't happen again. Also fields are built more enthusiastically.

Jonathan Waller [ aka quantumstate ]

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


Support Wildfire Games!


#168 JuliusColtranePille

JuliusColtranePille

  • Donator

  • Sesquiplicarius
    (120 posts)

Posted 23 December 2011 - 10:28 AM

View Postquantumstate, on 23 December 2011 - 10:17 AM, said:

I have put a territory check into the resource finding code so this shouldn't happen again. Also fields are built more enthusiastically.

just for my interest: how much time takes it to manage such a problem for you? seems you are pretty fast! ;)

good stuff
"Jazz means Freedom."

Miles Davis

#169 quantumstate

quantumstate

  • WFG Programming Team

  • Primus Pilus
    (1,086 posts)

Posted 23 December 2011 - 11:24 AM

View PostJuliusColtranePille, on 23 December 2011 - 10:28 AM, said:

just for my interest: how much time takes it to manage such a problem for you? seems you are pretty fast! ;)

good stuff

This depends a lot on the problem ;). For this problem it was very fast because not much code needed to be added and the problem was exactly known beforehand. I try and prioritize bugs in general because it encourages feedback and it is nice not to have lots of issues piling up. Here it was instant knowing the problem, less than 10 minutes writing code, then 5 minutes testing (by repeatedly deleting farms in the bots base so it had to go further afield for food) and then committing the code which was simple.

There are basically two sections to a problem. First is finding out what is going wrong, this currently involves thinking about what the code is doing and sticking lots of statements in which print things at various points so I can narrow down what is happening. e.g. Pureon found that on Hellanized Egypt qBot stopped producing anything after a while, the cause was that the maximum resource gather distance was too small so the fix was one number being changed. Finding the problem took maybe 45 minutes though since every test took a while to reach the point where qBot stopped working and I needed several attempts to narrow down the problem. In other cases such as siege not being used properly (still the case) the problem is obvious, since there is no siege specific attack code but implementing it requires careful thought and quite a lot of code so will take a good few hours probably.

Jonathan Waller [ aka quantumstate ]

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


Support Wildfire Games!


#170 Pureon

Pureon

  • 0 A.D. Art Team

  • Primus Pilus
    (3,242 posts)

Posted 23 December 2011 - 12:31 PM

Thanks quantumstate, we appreciate the time you put into fixing our bugs :D
Pureon
0 A.D. Designer / Texturer / 3D Artist
Contact email:
pureon{@}wildfiregames.com

#171 quantumstate

quantumstate

  • WFG Programming Team

  • Primus Pilus
    (1,086 posts)

Posted 23 December 2011 - 04:00 PM

View PostPureon, on 23 December 2011 - 12:31 PM, said:

Thanks quantumstate, we appreciate the time you put into fixing our bugs :D

I think they are probably my bugs actually ;).

Jonathan Waller [ aka quantumstate ]

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


Support Wildfire Games!


#172 feneur

feneur

  • 0 A.D. Project Leader

  • Cartographer of imaginary worlds
    (7,090 posts)

Posted 23 December 2011 - 09:05 PM

View Postquantumstate, on 23 December 2011 - 04:00 PM, said:

I think they are probably my bugs actually ;).
It's good that you take ownership of them, but I'd say they are our shared burden at least in the sense that they are a part of the game we all work on ;)

Erik Johansson [ aka feneur ]

Wildfire Games
Contact me: feneur@wildfiregames.com



Support Wildfire Games!


#173 quantumstate

quantumstate

  • WFG Programming Team

  • Primus Pilus
    (1,086 posts)

Posted 23 December 2011 - 09:09 PM

View Postfeneur, on 23 December 2011 - 09:05 PM, said:

It's good that you take ownership of them, but I'd say they are our shared burden at least in the sense that they are a part of the game we all work on ;)

I was referring to the fact that I created them :). I feel I should take responsibility for the errors I created.

Jonathan Waller [ aka quantumstate ]

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


Support Wildfire Games!


#174 tribalbeat

tribalbeat

  • Community Members
    Pip

  • Discens
    (71 posts)

Posted 24 December 2011 - 01:24 AM

Haha, I just played against Qbot in Alpha 8 and it is so much smarter than Jubot! Still, it doesn't have any sort of way to communicate and work with allies. I feel it would add tons if the AI would "type" out things depending on what it is trying to do. For example, if the AI is attacking an enemy, it should say to it's allies that it will be attacking the enemy, or if it "wants" to trade with a teammate, it should tell them to build a market, but only if the teammate doesn't have one.

However, it is still a great improvement over Jubot, keep up the amazing work!

#175 ribez

ribez

  • Community Members
    PipPipPip

  • Duplicarius
    (281 posts)

Posted 24 December 2011 - 09:32 AM

i've played a game in Median oasis map. At the beginning the ai is aggressive, but after some time it became inactive: i think that ai players finish their resources and don't know how to use the bartering system... when i have attacked their territories, i've found plenty of women doing nothing near the border of the map ready to be slaughtered.

I'm a very slow player (the game finished after 2 hours), so maybe the ai players are just tired :P

but overall the ai has made great improvements since the last alpha release (y)

#176 infyquest

infyquest

  • Community Members
    Pip

  • Discens
    (48 posts)

Posted 24 December 2011 - 10:48 AM

I think in qBot, we also need to take care of below in ALPHA 9
  • attack bonuses,
  • the idle workers if resources are not there
  • trade or barter
  • handling allies


#177 quantumstate

quantumstate

  • WFG Programming Team

  • Primus Pilus
    (1,086 posts)

Posted 24 December 2011 - 06:33 PM

View Postinfyquest, on 18 December 2011 - 02:24 PM, said:

added a config.js file http://pastebin.com/vCrGg2t4
need to modify the rest of the code, check it out

I have put this into qBot now, I changed the style to the json style of object definition because I think it looks clearer. Working out how dynamic properties will be defined still needs to be decided.

Jonathan Waller [ aka quantumstate ]

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


Support Wildfire Games!


#178 Pureon

Pureon

  • 0 A.D. Art Team

  • Primus Pilus
    (3,242 posts)

Posted 24 December 2011 - 06:57 PM

View Postquantumstate, on 24 December 2011 - 06:33 PM, said:

I have put this into qBot now
That's great! Could it eventually also be the way difficulty is set?
Pureon
0 A.D. Designer / Texturer / 3D Artist
Contact email:
pureon{@}wildfiregames.com

#179 quantumstate

quantumstate

  • WFG Programming Team

  • Primus Pilus
    (1,086 posts)

Posted 24 December 2011 - 07:07 PM

View PostPureon, on 24 December 2011 - 06:57 PM, said:

That's great! Could it eventually also be the way difficulty is set?

Yes, there aren't enough options exposed to do that very well right now, but in the future it should be the way to adjust things like that. The config file should be powerful enough to produce specific AI play styles, so there could be booming/rushing/... types of AI all sharing the same base logic. Then this can be randomly picked or specified in the game setup.

Jonathan Waller [ aka quantumstate ]

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


Support Wildfire Games!


#180 ac892006

ac892006

  • Community Members
    Pip

  • Discens
    (30 posts)

Posted 25 December 2011 - 05:34 PM

View Postribez, on 24 December 2011 - 09:32 AM, said:

i've played a game in Median oasis map. At the beginning the ai is aggressive, but after some time it became inactive: i think that ai players finish their resources and don't know how to use the bartering system... when i have attacked their territories, i've found plenty of women doing nothing near the border of the map ready to be slaughtered.

I'm a very slow player (the game finished after 2 hours), so maybe the ai players are just tired :P

but overall the ai has made great improvements since the last alpha release (y)

I played Alpha 8 in oasis 2 alpha 8 for 50 minutes and the same issue propped up .

Qbot was great for the first 35 minutes but the moment I constricted Qbot's territory Qbot fell apart . It ran out of resources and stopped producing units that could defend its position . As a result 6 war elephants was all that it took to destroy Qbot . Apart from that Qbot is a large improvement over Jubot from alpha 7 .

Edited by ac892006, 25 December 2011 - 05:35 PM.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users