AI does not send geologists

Bug #1346763 reported by Tino
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Won't Fix
Wishlist
Unassigned

Bug Description

Version: Trunk, bzr 7125

Steps to reproduce:
- Start a MP game as observer with several AIs (e.g. Together we are strong)
- After some time, the AIs build directly mines on the correct spots, without sending geologists before

Tags: ai
Revision history for this message
TiborB (tiborb95) wrote :

Was AI ever sending geologist? AI can query content of each field directly (f.e. it can count fishes in water). A common player usually can not see whether AI sent a geologist or not.

Revision history for this message
wl-zocker (wl-zocker) wrote :

I think the AI has never done that.
The point is that the AI cheats with looking at the resources. Since the AI is not very good, I have to problem keeping this as is.
The question is whether we want to show the player that the AI cheats. I could imagine that the AI sends some geologist to the mountain some minutes before it starts building mines (it could send the geologists where it wants to build the mines, i.e. knowing what resources it will find). I do not know if this can easily be implemented (the AI would have to "think" ahead).
Tibor is right, this cannot be seen in normal games, but it cannot be overlooked in multiplayer games, in replays, or when playing without fog of war.
So I think it would be nice to have this fixed, but if it is too complicated, leave it.

Changed in widelands:
status: New → Confirmed
Revision history for this message
TiborB (tiborb95) wrote :

First some "send_geologist" function needs to be available. It seems there is none.

If it was I can image a function that would every 5 minutest sent geologist to random flag. I think no connection to actual building of mines/wells is needed.
Unless the watcher will investigate their work very closely it would be fine enough.

Revision history for this message
wl-zocker (wl-zocker) wrote :

> send geologist to random flag

Since most flags will be on grass and not in the mountains, most geologist would look for water instead of ore.
Is it possible to "fake" the mine building so that the AI searches for good places, but does not build a mine there, but sends geologists instead. Since no accurate building plot is needed, some approximations can be done.

Revision history for this message
TiborB (tiborb95) wrote :

AI could send geologist only if flag is in mountains. But it would require another logic to erect a flag on random place in mountains (though sometimes there is a road over mountains with flags of course)

I dont like the idea that AI pick a position for mine, sends there a geologist there, wait x minutes and build a mine there afterwards. Benefit is negligible.

Also results of geologist's work would be none - no resource placeholders will be shown - correct?

I dont say I am against it, but I am willing to program only some trivial design, nothing complex... So it would be done by somebody else.

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

>Was AI ever sending geologist?
>I think the AI has never done that.

I remember discovering this a couple of years back, so I think the AI has always behaved this way. Ideally the AI shouldn't cheat, but I don't think this is too bad. Here's my reasoning why:

You play a map and encounter some mountains. You need to scout these with geologists to find out what they contain and then proceed to build mines. Scouting the moutains takes some time, which the AI is currently able to skip which means it can start producing metal (and likely weapons) earlier. Though if both you and the AI needed to send out geologists before building mines the AI would lose its slight advantage and things would be fair.

Except that if you have played the same map previously you are likely to remember where the different metals are located and can build most if not all your mines straight away. So this would move the advantage from the AI to players playing a map they have played before. Which means you end up with the AI spending time sending out geologists to the mountains which could have been used for metal/weapon production instead making them less challenging as opponents when you run into them later.

I haven't played much against the AI after the recent changes, but at the time the AI didn't seem all that challenging after defeating it a couple of times (at least on smaller maps). Thus, reducing the challenge would probably make it too easy.

Another point is that you might meet other humans in multiplayer which have memorized the map and dont' need to send out geologists. So one could say the AI is simulating these players ;)

tags: added: computerplayer
Revision history for this message
Tino (tino79) wrote :

I agree that it is rather a cosmetic issue.
It is not necessary to implement a complex AI construct to satisfy players who are watching computerplayers.

But I see here a way to differentiate the 3 AI levels agressive,normal, defensive:
The current behavior seems to fit for agressive, like a human player who does know the map.
For normal and defensive there should be a (time?) penalty which mimics a player who has to search the mountain range.

Setting importance to wishlist.

Changed in widelands:
importance: Undecided → Critical
importance: Critical → Wishlist
Revision history for this message
TiborB (tiborb95) wrote :

two comments:

AI cheats, but it could have cheat worser. It is able to query resorces on all fields on map but it does not do it. It queries resources only about 10 fields from owned teritorry.

It will be needed to add some "stratification" to AI as now there are minimal differences between agressive to defensive modes

Revision history for this message
SirVer (sirver) wrote :

Well, either the AI cheats - but then we do so openly please. Or it does not cheat and we implement player knowledge properly in the AI. Building something that make it seem like the AI is not cheating, but it really does is against my ethics and also a waste of CPU cycles.

Right now, the AI is not strong enough to not cheat. So let's cheat. I still think it would be desirable if the AI would not need to cheat.

Revision history for this message
TiborB (tiborb95) wrote :

but the scope of cheating is quite small. Mines are mostly build long after a field is conquered and AI player would have enough time to sent a geologist and wait for results. So if we implemented this functionality the difference would be negligible.

Revision history for this message
Albert Einstein (w-aaaaa) wrote :

I think that implementing the idea is not a problem. Just send geologists to the fields with mountains. That's all.
Other thing with cheating: it should exists forever. The idea with player who knows the map is just the same as AI asking Widelands what resources are underground.
We can put the code for AI which will send geologists and don't change anything else.

GunChleoc (gunchleoc)
tags: added: ai
removed: computerplayer
Revision history for this message
GunChleoc (gunchleoc) wrote :
Changed in widelands:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.