Page 1 of 1

Fair play vs. cheating AIs

Posted: 13 Jan 2012, 15:34
by aubergine
I was wondering if it would be worth creating some guidelines for AI developers in order to ensure that AIs play fair. This would provide a quantitative way of assessing if an AI 'cheats' or not.

Here's my first attempt (this would probably be better in the wiki?)...

Visibility

A human player has 4 levels of visibility of items on the map, and your AI should work the same way:

Hidden

These are parts of the map covered by "fog of war" (FOW) and the human has no idea what's there.

If your AI wants to know what's there, it should scout or build radars / satellite uplink to remove the FOW (unveiling - see later).

Preview

These are features that were shown on the map preview when the human set-up the game, such as oil resources and player starting locations.

If they are in the FOW from your AI's perspective, the AI should unveil the map.

Echos

These are things in the FOW that are still visible on the map:

* a previously visible building that's now back in the FOW
* a previously visible droid that's just gone in to the edge of the FOW (a green radar ping appears to show it's movements in the FOW, but it eventually disappears)

It's not currently clear how an AI should deal with this. A request has been made for an isVisible property on droids/structures/features which would facilitate AIs handling this situation.

Visible

These are things that are in full view on the map, eg. within range of a radar/droid/structure or exposed by satellite uplink. You can look at them on the map and see what they are doing, etc.

Unveiling

Humans have to explore the map to remove the FOW and find things, and only then can they full interact with them. For want of a better term, I'm calling this "unveiling".

For example, if a human knows the rough location of an oil resource but it's in the FOW, they can't build a derrik on it. They have to send a truck to the general location and only once the FOW lifts and they see the oil resource can they build the derrik.

A request has been made for new events that would make it feasible for an AI to work this way (using the JS API): eventNewStructureDetected(structure,sensor) & eventNewDroidDetected(droid,sensor) & eventNewFeatureDetected(droid,sensor)

If these events (or similar) are provided, the AI can "head in the general direction" to lift the FOW then get notified of the new features/structures/droids that are unveiled and react accordingly.

Don't create stuff unfairly

Your AI can create structures/droids before they are researched or even if there isn't enough oil to create them. It can remove structures from the map without demolishing/recycling them. A human can't do this - so you're AI should resist the temptation and only do what a human could do.

If you want to create something, you have to research it and then build/recruit it in the normal way. If you want to get rid of something, you have to demolish/recycle it in the usual way.

Oil

Your AI can create oil out of thin air, but humans can't.

If you want more oil, you should unveil oil resources on the map, build derriks on them with a truck and build enough power generators (using trucks) to make them operate.

Re: Fair play vs. cheating AIs

Posted: 13 Jan 2012, 17:01
by Chojun
Here's the problem.

AI can't easily adapt to differing play styles and human skill levels. AI are significantly disadvantaged compared to human players and once a human discovers an AI's weakness, then that AI is no longer viable as an opponent. The game becomes boring.

An AI cheats so that it can have certain advantages over the player, to make the game challenging (ergo more rewarding) for the player. I'm not so sure that making a 'fair play' AI will really be beneficial to the player, after all.

Re: Fair play vs. cheating AIs

Posted: 13 Jan 2012, 17:05
by aubergine
True, but on the flipside an AI is constantly working - it doesn't have to scroll round the map and manually select things or interact with the UI to get stuff done. But I agree with you in that an AI can't adapt as well as humans and thus cheating a little will help balance gameplay.

Re: Fair play vs. cheating AIs

Posted: 13 Jan 2012, 17:29
by cumandgetit
depoyed intel gathering UAVs / MUAVs ... it's supposed to be 22nd century warfare in a resource scarce world afterall, no ? ;)

Re: Fair play vs. cheating AIs

Posted: 13 Jan 2012, 20:48
by lav_coyote25
cumandgetit wrote:depoyed intel gathering UAVs / MUAVs ... it's supposed to be 22nd century warfare in a resource scarce world afterall, no ? ;)
my fav tactic. but then there are those that say, "oh!! your cheating!!! your using vtols!!!!". pffft... goes back to that piece i did on stupid rules. oh well, perhaps one day people will come around to the idea of using the ENTIRE game , not just some aspects of it. :annoyed:

Re: Fair play vs. cheating AIs

Posted: 14 Jan 2012, 11:22
by cumandgetit
cumandgetit wrote:
deployed intel gathering UAVs / MUAVs ... it's supposed to be 22nd century warfare in a resource scarce world afterall, no ? ;)
lav_coyote25 wrote:
my fav tactic. but then there are those that say, "oh!! your cheating!!! your using vtols!!!!". pffft... goes back to that piece i did on stupid rules. oh well, perhaps one day people will come around to the idea of using the ENTIRE game , not just some aspects of it. :annoyed:


like i said in the js api doc thread about another post lookin like an invisble gorilla on the basketball court - just whistling Dixie in yank country. lol. ;)

seriously, it's thinking outside the box with nerve, imagination and a balance off-set mechanic that's cool. the ai's uav would be smaller than a bug bod, faster, more fragile and NO armament-ordinance pkg., just intel gathering mission. ai is a hive mind, player has commanders with new ability: target, assimilate, commandeer ai's uavs. balanced. cool. cheating no factor. game refreshed with tac-strat variety, new interesting challenges in skirmish. also, many ai challenges are related to FOW and this deals with 'em sensibly, imho. there are probably other outside the box working solutions yet to be thought of.

Re: Fair play vs. cheating AIs

Posted: 14 Jan 2012, 17:53
by Chojun
cumandgetit wrote:depoyed intel gathering UAVs / MUAVs ... it's supposed to be 22nd century warfare in a resource scarce world afterall, no ? ;)
I agree.

I know some long-time members have spoken quite a bit to UAVs as a GPM. Would be interesting.

Re: Fair play vs. cheating AIs

Posted: 15 Jan 2012, 18:32
by Rman Virgil
cumandgetit wrote:deployed intel gathering UAVs / MUAVs ... it's supposed to be 22nd century warfare in a resource scarce world afterall, no ? ;)
Chojun wrote:I agree.

I know some long-time members have spoken quite a bit to UAVs as a GPM. Would be interesting.
I experimented with these basic concepts (UAVs, C41, 21st Century Velocity Maneuver Warfare, revised FoW) on 5 different occasions / projects in the past. All extensively tested by yours truly along with a bunch of my MP gaming buds (like 'getit'). :3

1st time BEFORE source release in 2004 (I think 2002-03). The initial idea was inspired by Prometheus's WZ H2O A.I.. Wonderful a.i. that utilized sensor hovers, from jump, to explore the map - water was NEVER a handicap for this a.i. I modified the a.i. to use a bug VTOL.

2nd time a few months after source release, sometime 2Q 2005. I modified Troman's very first iteration of his adaptive A.I. called Aivolution which worked with a modified WZ binary and data-set called v.1.10C and utilized Campaign Transport Drops and Kill Bonuses for High Ground to Low Ground ordinance.

3rd time with a different version of Aivolution (without Transport Drops among other changes like chat console & allying with A.I. in MP) with some modifications in my Trinity map-mod project in 2007.

4th time utilizing a modified version of NiKer's BecomePrey A.I. in my War School map-mod project in 2009.

And the 5th time, modifying Dylan Dog's DyDo A.I. (inc. the Scav A.I.) in my SP 8c-ManGodAi4x & 4c-AquaCoop MP project which started with purely mapping techniques but which I ended incorporating modifications of some complexity in 2010-11.

- Regards, Rman. :D

Re: Fair play vs. cheating AIs

Posted: 16 Jan 2012, 06:20
by aubergine
It would be quite nice to have a super-cheap scout vehicle - like a remote-controlled trike buggy sort of thing (similar to scav trike?) - that you could get right at the start of the game before even radar towers.

The scout would be fast and used to zip around exploring the map. It would be great if I could set it to "scout" mode and it would just go off on it's own and start exploring black "fog of war" regions to see what's there. And you could set it to partrol between waypoints as a sort of early warning system should enemy troops appear.

If they were super-cheap and quick to produce, I'm sure they'd get some use in the early stages of the game. They'd also be ideal for scouting out enemy artillery - send them towards enemy base and see where they get blown up so you know that's where you're troops will come under attack.

Re: Fair play vs. cheating AIs

Posted: 16 Jan 2012, 13:09
by Rman Virgil
aubergine wrote:It would be quite nice to have a super-cheap scout vehicle - like a remote-controlled trike buggy sort of thing (similar to scav trike?) - that you could get right at the start of the game before even radar towers.

The scout would be fast and used to zip around exploring the map. It would be great if I could set it to "scout" mode and it would just go off on it's own and start exploring black "fog of war" regions to see what's there. And you could set it to partrol between waypoints as a sort of early warning system should enemy troops appear.

If they were super-cheap and quick to produce, I'm sure they'd get some use in the early stages of the game. They'd also be ideal for scouting out enemy artillery - send them towards enemy base and see where they get blown up so you know that's where you're troops will come under attack.

Yes. :D Scav scouts for the Ski A.I.'s My rationale was that Scavs were "compelled" to ally with NEXUS and its minion factions.

That's partly how I used 'em in my SP 8c-ManGodAi4x map-mod with the modified DyDo.

Works great for rapid map intel but they also served to divert the player attention & resources, stall expansion (killing player's scout trucks in early game) all the while buying time for the A.I.'s to utilize all the quick intel (and fairly procured - no map omniscience like original SC A.I., ie.) to advance on all critical fronts - resource staking, research & build order, expansion, etc.

Have loved experimenting with WZ over the years for fun AND data. Beats purely discussing "what if ideas" without ever getting down to prototyping-testing 'em in the crucible of the game's emergent complexity, any day of the week, IMHO. :3

- Regards, Rman. :hmm:

EDIT: For this allied Scav Scouting function I also used Member Black Project's Scavenger Helicopter in "War School" with modified BP. Those pups look so cool too - still brings a grin to my face, the memory of them in action. :)
.