Jump to content

The JuBot Thread


Recommended Posts

So I think I've figured out why Jubot was so slow that one time.

1) It's getting choked on wood. After a good long while, it had 600 food, 80 wood, 4000 stone and 6000 metal. Metal and stone should be put at a slightly lower priority. Now that I'm thinking about, it would probably be best if there was a way to give different resourcing priorities depending on your civ. Since Iberians are metal heavy, and the Hele want lots and lots of wood and stone. Maybe also a check that would pull workers off of a given resource when stocks get too high...

2) Jubot LLLOOOVVVES berries. Instead of building farms after the berries and chickens next to the civ center were gone, it sent gatherers about 30 seconds one way to an apple tree. Though this was probably because it didn't have the wood for farms. Still, even when it did, Jubot wasn't building enough farms. I'm not sure whether a better solution would be to teach the bot to build farmsteads, or make farms slightly more important. Actually, if you could teach calvary to be hunters, that would be pretty great.

3) Did you remove the (I think it was 4 minute) timer on the military agent that prevents it from launching attacks "too often"? If it's still there, it should be shortened for sure. Jubot still seems pretty relaxed. Especially now that there's retreating so each attack doesn't mean all the units can be considered lost the moment they go marching off.

Anyways, I like the military behavior, especially the retreating. Is that new? Cause I've never noticed it before.

Edited by gudo
Link to comment
Share on other sites

I don't have the SVN version, as I am using a Mac binary, but I would just like to say that it is a shame that JuBot currently doesn't build ships. I played Alpha 7 today, on the islands random map, but was disappointed to find that JuBot can't yet deal with water based maps.

Other than that, not much to say other than keep up the good work (y).

Link to comment
Share on other sites

JuBot: The Feedback Thread

Please post feedback on the latest SVN versions of JuBot here!

Latest SVN: 24 Sept 11

The Exilian JuBot thread, which I am more likely to post progress on, is here:

http://exilian.co.uk...81.msg36786#new

Seems like your new changes are basically laying the foundations for something good. Right now though, it seems like Jubot doesn't train any units from the Stoa, etc. like it used to. Fewer Champion units too. I've also noticed that Jubot builds a town almost exactly the same way each time I play against it on a map. In the Oasis II map for instance it always leaves its Northern flank completely exposed to attack. It also needs some updates in order to handle Carthage's multiple barracks. This is understandable though, as we threw you for a loop there with Carthage! ;) I'd perhaps keep the AI 1 step ahead on Houses, as right not it feels like the AI is producing fewer units than before. Not sure though, haven't done any conclusive tests on the subject.

Anyway, everyone's a critic! ;) Digging the progress. (y)

Link to comment
Share on other sites

How's the economy handling itself at the moment, anyone?

I think it's doing well until all the resources nearby are depleted. After that gatherers travel long distances to get more resources. It would be nice to see Jubot building at least one more CC somewhere on the map (an area with plenty of resources).

I do like it's defense an attack strategies a lot! Perhaps a few more siege units earlier on - I've only ever seen it build 1 or two, and those are very late in the game.

Link to comment
Share on other sites

The choking problem is much better than it was, yeah. Still, it's slower than it could be. Now I'd say the economy needs work in the mill placement dept and which specific resources to gather.

The mill placement code is really strange. I noticed that after a while, Jubot just spams mills everywhere. I think this is because of the way the building list works. Once it's built all the barracks and towers on the list, it has nothing to build but mills. Also, it could stand to place a few more earlier in the game. As for the other point, the chief problem is that workers are told to gather whatever is closest to them when they should be tasked to gather what's closest to the drop point. Not really sure how you'd go about fixing those, but as far as the economy side of the AI is concerned, that's what I'd try to take care of next.

Link to comment
Share on other sites

I tested the (almost, due to git lagging behind the subversion repository) newest JuBot and am quite impressed with the progress made. Apart from more strategical improvements (building new civ centers, building drop sites more efficiently, counter unit types, ...) I would propose (as Pureon pointed out already) that JuBot builds more siege units and does it much earlier. It really makes a huge difference if attacking fortified positions.

Apart from this, I also ran into performance problems when I destroyed the civ center of one of the JuBots before destroying any other building. It then tries to find a place to build a new one but doesn't succeed, so it tries again and again (I don't know why it fails, something with territories perhaps?). To find a building site it calls addInfluences for any of its buildings which seems to be quite expensive. The real fix for this is of course to find the reason why it doesn't find a building site but even then the finding procedure should be optimized.

A proper but probably difficult to implement fix would be to calculate the influences map only once and update it when a new building is constructed or an existing one is destroyed. But there are some easier optimizations (I didn't profile this, so I don't know which one is worth trying). The most expensive operation is probably the square root in the distance calculation. You could switch to a quadratic (rather than a linear) fall off to get rid of it or use some approximation (see for example http://www.azillionm...t.html#distance).

Another easy performance improvement would be to reduce the influence radia, at least for some buildings (houses!). Probably you even could ignore houses altogether in this calculation.

Edited by UV_Completion
Link to comment
Share on other sites

Apart from this, I also ran into performance problems when I destroyed the civ center of one of the JuBots before destroying any other building. It then tries to find a place to build a new one but doesn't succeed, so it tries again and again (I don't know why it fails, something with territories perhaps?)

Can you confirm the CC build plan is actually executed? That's when it looks for a valid position, but I think it will always come up with something.

Link to comment
Share on other sites

Jubot in build 10359 seemed to be much more challenge when playing long game. I put jubot and splitbot (alpha3) against me and build defences and waited. Jubot scouted with cav and then attacked quite early with small force -> did not even scratch my base. But after time warping about 10-15 minutes Jubot attacked with very large force. It used war elephants which Carthaginian can use and normal foot soldiers. Destroyed my fort and killed at least 30 soldiers.

I also played aggressively on a small map against it and it did much better. Attacked with small force before me and defended base with all soldiers like I do when necessary.

Link to comment
Share on other sites

Jubot in build 10359 seemed to be much more challenge when playing long game. I put jubot and splitbot (alpha3) against me and build defences and waited. Jubot scouted with cav and then attacked quite early with small force -> did not even scratch my base. But after time warping about 10-15 minutes Jubot attacked with very large force. It used war elephants which Carthaginian can use and normal foot soldiers. Destroyed my fort and killed at least 30 soldiers.

I also played aggressively on a small map against it and it did much better. Attacked with small force before me and defended base with all soldiers like I do when necessary.

is it possible that jubot is the only bot which functionates at build 2588?

Link to comment
Share on other sites

  • 2 weeks later...

Territory data is now added to the AI state (r10408). One consequence I notice with Jubot on certain maps like Gambia River (player 2), it tries to build too many mills. I think the problem is it focuses on a resource outside of its territory area, and keeps trying to build mills without realizing it can never get close enough. Territory should be taken into consideration when computing distance to resources, maybe forget a resource if it's too far away from your territory (or better yet, expand territory with CCs to capture it :D)

Unless we choose to allow building mills in neutral territory, but I must say it gives some extra incentive to have territory!

Link to comment
Share on other sites

  • 1 month later...

I played today on the alpha 7 and found that when i attacked villagers who were gathering metal far away from their base, they did'nt send troops to defend the villagers (all females), they built a warehouse, instead... So o kept attacking and killing their villagers until had enough troops to strike their base once and for all. I couldn't end the game (8 players, 7 JuBots, FFA) because when i was going to destroy the third JuBot the game stopped responding.

Link to comment
Share on other sites

Good to see Jubot expanding (y)

I still find Jubot sometimes sends attack armies to it's allies base, rather than to enemy bases - is it an easy fix to stop that happening?

jubotallies.jpg

Think of the attack army as reinforcements to protect your base . In fact this could be very useful to have some troops at your base while you concentrate on the economy . jubot could send some extra troops if it had any to spare .

Link to comment
Share on other sites

  • 2 weeks later...

I played a bit on Oasis V against Jubot today, and every say ten seconds or so there was a slow-down. It seemed like it was caused by the AI being confused by there being two CCs (or at least because it tried to put units from both places in formations or something, or perhaps just that the central, most direct route between the two initial player one CCs is fairly narrow, with a lot of trees). That's probably a bit hard to work around (alternatively depend on other non-AI improvements). Another thing I noticed should hopefully be easier to do something about: the AI tried to build CCs right on the edge of my territories, where it was easy for me to destroy them (at least once I noticed what it was doing =) ). Perhaps you could put in a limit for how close to the enemy CCs/fortresses the new CCs should be built. At least the first ones shouldn't generally be too close as they are too vulnerable.

Link to comment
Share on other sites

  • 2 months later...

Somebody's gonna need to update Jubot wrt the scout tower rename to defense tower. If I did my homework correctly, the only file that needs changed is

http://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/simulation/ai/jubot/economy.js

We will indeed, thanks for reporting it! And have we ever discussed how yucky it is to hardcode template names in the AI code? :(

Link to comment
Share on other sites

We will indeed, thanks for reporting it! And have we ever discussed how yucky it is to hardcode template names in the AI code? :(

Thing is... Some units lack proper "classes". For example, there is no way to know if a unit is a javelin or an archer. Which, given that now units will work with counters, is -extremely- annoying.

Link to comment
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.

 Share

×
×
  • Create New...