Diplomacy
Cogitations

Commonality

John Newbury       19 October 2008

Home > Diplomacy > Cogitations > Commonality

Cogitations on AI in the Game of Diplomacy: Commonality


Here is a brain dump of full details my current Cogitations about commonality, which covers kinship and affinity. (Later Cogitations override earlier ones if contradictory.)

Contents

2008-07-21

Kinship

[Originally presented in DipAi post #8158.]

Following on from posts re. apparent non-press collaboration between Alberts, I have just realized an interesting problem, an approach to solving it, and associated possibility for a simple experimental enhancement to BB. It would provide the base of a general framework for the method, for negligible work (less than writing this note!), with some gains in ability in against certain types of opponents.

Problem

It is common to gang up against the leader; maintaining Balance of Power can be a good strategy for all except imminent soloist. But also, less fairly, people (at least) tend to gang up against those different from themselves. Self is preferred, then twins (clones), members of close family, wider family, neighbours, club, town, country, religion, species, and so on, and near the end, living versus non-living. And humans tend to be best at recognising such differences – indeed they cannot stop themselves, even if ordered to! So, in particular, humans are most likely to gang up against bots! Not fair! To give bots a decent chance against humans, they ought to be allowed to do likewise (despite the DAIDE principle being to denigrate such a feature). And bots cannot formally detect humans, so cannot necessarily restrict any such ability to fighting humans.

Conversely, bots would do better if they could masquerade as human, but with press, this would require Diplomacy equivalent of a Turning-Test of true AI – a very long way off, albeit easier than unrestricted Turning Test.

Already, by default, Albert 3 tries to hide its being a bot (when no press) by adding a human-like delay to non-movement turns, as a sub-second turn, due to typical high speed submissions of bots are too much of a give-away that all submitters in that turn are bots. And it seems, from Mo's empirical (maybe subjective) observations, that Albert, as I have argued is likely with any bot, has some cooperative bias with its kin (positive for Albert, as it happens), but in an uncontrolled way.

Solution

In general it would seem to be a good strategy to try to appear as similar as possible to other players, with emphasis on those who would most willing and able to help/cooperate. This would even apply between humans; for example, they would inevitably wish to help their kin more than others, especially bots if/when they become a serious challenge. Also best to masquerade as having similar ability: not so much that you appear a threat, nor so little that you appear to be a push-over, and not worth allying with.

(Worryingly, although this seems to imply an advantage for "family values", it also seems to imply an advantage in being racist, nationalist, religious, specist, or similar. Perhaps that explains their prevalence. Without trying to be PC, I would only say here that, whatever their merits during human genetic and social evolution, I believe that nowadays, in this overcrowded world, it is generally better to cooperate; for example, to conserve the environment, than to compete, other than sufficient to allow market forces to optimize what central planning can never do.)

At least when playing humans, or for alternative (non-DAIDE philosophy/etiquette) bot tournaments, it would be useful if bots could be given similar facilities, which could be enabled when trying to beat humans; disabled when playing bots under DAIDE philosophy/etiquette. Or varied in between to get most balanced game.

Experiment

I have some ideas how to trivially add a basic such structure into BlabBot (BB), which I will probably do today. (I have already done most of the work, just writing this note to get my ideas in shape!) In outline, kinship would be represented by one or more conceptual family trees (probably not actually represented within the bot); for example,

DavidNorman/DumbBot/2
DavidNorman/DumbBot/2/BlabBot/2/1
DavidNorman/DumbBot/2/BlabBot/3
JohnNewbury/BlabBot/3
JohnNewbury/DeepLoamSea/2
DeepLoamSea/1
Albert/3/0
ConsBot
...

DavidNorman/DumbBot/2/BlabBot/3 and JohnNewbury/BlabBot/3 are synonymous, albeit different depth; it does not imply that the prefixes, DavidNorman/DumbBot/2 and JohnNewbury, are synonymous. The former path reveals that my new BlabBot 3 is based on the heuristics of, so has similar behaviour to, David's DumbBot 4. The latter path reveals that BlabBot 3 is based on the heuristics of, so similar to the behaviour of, any derivative of BlabBot 3. But also, JohnNewbury indicates presumed similarity of conventions/interpretations used by all other bots from my stable, including my (future) DeepLoamSea 2 (which, as it happens, will not resemble DeepLoamSea/1 at all – that mostly resembles ConsBot, though its AI [sic] code is not based on any of it!) (Use of common code is not a requirement for similarity of behaviour; other theoretical, or empirical, reasons can be used, including bot-learned ones). (NB: The kinship hierarchy is not attempting to represent or honour contributions due to ancestors, so DeepLoamSea/1 and Albert/3/0, say, do not indicate that they are based on David's C++ framework. We are only interested here in expected similarity of behaviour of AI parts – their heuristics, conventions and interpretations used. A "convention" would include my ideas of how best to decide that an agreement has been reached or cancelled, and so on, which might differ in detail from what others may do – what they interpret as correct/permissible. Hopefully not too different!)

A command line option would indicate how many levels down which hierarchy are allowed for kinship detection in the current game, and hence which kin detection heuristics (never certainty) are permitted; all 0 by default (to comply with DAIDE etiquette). Hierarchies maybe just be identified by unsigned integers; the bot would know how to map synonyms.

As it happens, when press is allowed, BlabBot 3 will be so readily identified by humans, that they will be unable to stop themselves victimizing all its clones if that is in their unconscious trait. So to make a fairer game, BB can be allowed to recognise its clones too. (Any other bot could easily be coded to do this too, and maybe get some advantage. Any bot or human could easily act in a similar manner (masquerade as BB kin), thereby equally gain by bonding with BB, at the cost of being victimized by humans. (Other humans would easily recognise another human masquerading as BB kin, and would probably guess his strategy – they would not suffer the ignominity of being thought a bot, and so would not be shunned by other humans!)

Specifically, BB tends to cooperate with its friends. In any version, a friend is normally one who agrees to mutual PCE (unless all other remaining players make such an agreement). However, if BB 3 is allowed to recognise its kin, and detects one or more (but not if all opponents), only they are considered to be friends. In that case its PCE agreements will be ignored. This would confuse players (bots or humans) who (even now with BB 2.1) agree PCE to gain cooperation from BB, but do not honour their side. Those who cynically cooperate for a while when PCE is agreed (only), then stab, would do worse with kinship detection enabled on BB, as they would then have cooperated for a while for no gain!

I am not arguing that any significant effort should be put into any of this – as is the DAIDE philosophy. BB will not attempt to recognise its clones, from style of play, in no press games, but sometime DLS, say, might be coded to recognise some naturally present distinctive features of its play, including timing (and hence that of its kin). (It could also use artificial signals if desired.) It could then be adjusted to give better players (humans, say) a decent game, pending real improvements. It could also simulate effectiveness of being able to negotiate better cooperation, by some future (DAIDE etiquette compatible) enhancements that do not need kinship detection.

When learning is enabled, knowledgebases would diverge if updated in isolation on different computers, analogous to speciation. (This could happen if, say, Jason ran a copy of DLS on his computer and I ran one on mine.) If later brought together in the same game they would merely be kin. (However, I think I have a good way of merging what is learned independently, even if the sets of primitives are not quite identical, due to code update too. I will do a note on that sometime.)

2008-09-19

Affinity

Affinity is like kinship, except that the attributes are similar due to convergent evolution (or by design) rather than similar genes/code or ancestral closeness, compare with whales being like fish, in being streamlined, or DLS initially performed like ConsBot, though in neither case are the similarities due to being closely related.

Commonality

Commonality covers kinship and affinity – useful because it does not normally matter what caused the similarities.

Commonality of different contestants needs to be borne in mind when comparing them in DEMO, series, or avoiding bias, say, due to possibly unexpected overlap and redundancy. Different contestants will generally not be orthogonal (in their attribute sets). The population of a given contestant in a given environment could be arbitrarily diluted if another contestant were split into many very similar alternatives, each competing independently. Any formulae used should be independent of any such split (which may or may not be a deliberate manipulation).


Tracking, including use of cookies, is used by this website: see Logging.
Comments about this page are welcome: please post to DipAi or email to me.