Modeling Geostrategic Dynamics for the Indian Subcontinent

The Strategic Issues & International Relations Forum is a venue to discuss issues pertaining to India's security environment, her strategic outlook on global affairs and as well as the effect of international relations in the Indian Subcontinent. We request members to kindly stay within the mandate of this forum and keep their exchanges of views, on a civilised level, however vehemently any disagreement may be felt. All feedback regarding forum usage may be sent to the moderators using the Feedback Form or by clicking the Report Post Icon in any objectionable post for proper action. Please note that the views expressed by the Members and Moderators on these discussion boards are that of the individuals only and do not reflect the official policy or view of the Bharat-Rakshak.com Website. Copyright Violation is strictly prohibited and may result in revocation of your posting rights - please read the FAQ for full details. Users must also abide by the Forum Guidelines at all times.
shiv
BRF Oldie
Posts: 34982
Joined: 01 Jan 1970 05:30
Location: Pindliyon ka Gooda

Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by shiv »

The following was a suggestion made on another thread.
samuel wrote:OK, strange, maybe, cuz I think it is time to do that, too.

Modeling Geostrategic Dynamics for the Indian Subcontinent.
?
I'd like to think through and pull posts from various threads to kick things off. Standby.
I have been working on a game theory model of islamic extremism and it has now reached a stage when I can post the model and results in public and would like to start this thread for doing that.

Some very intresting conclusions seem to arise from the simulation, providing the model is correct.

All the data and graphs are ready - but I don't have time at this minute to post the stuff. I will do later today, but I will start the thread nevertheless in anticipation of an interesting discussion.
anupmisra
BRF Oldie
Posts: 9203
Joined: 12 Nov 2006 04:16
Location: New York

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by anupmisra »

shiv wrote:Some very intresting conclusions seem to arise from the simulation, providing the model is correct.
I'm curious to see how it pans out.
shiv
BRF Oldie
Posts: 34982
Joined: 01 Jan 1970 05:30
Location: Pindliyon ka Gooda

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by shiv »

The programming of the game for computer simulation was designed as follows:

The program compares the behavior of individuals of one group of people against those of another group. There are totally 3 groups of people, Islamic fundamentalists. moderate (Muslims) and dhimmis (non Muslims) Each individual of each 'group is assigned a "behavior" of "0" or "1". However fundamentalists have "1" behavior only, i.e only fundamentalist

The number of people in each group 'is set manually by answering a question as soon as the program starts. In turn the people of each of the 'groups "moderate" and "dhimmi" are assigned a "0" or "1" behavior randomly. This is then compared with every 'individual of both other groups and scores are totaled. The totals are displayed at the end of the program.

The behavior of fundamentalists is assigned the number 1. The number does not vary, based on the assumption that the Islamic fundamentalist is uncompromising in his demand for a particular type of behavior to be followed. The actual behavior I have in mind is probably a bit less than Taliban (i.e no killing is programmed into the code), but the attitude of a Hafiz Saeed or Masood Azhar would fit in quite well

The behavior of the Islamic moderate has two states each randomly assigned by the computer:

State 0: Here the moderate displays behavior that draws the anger of the fundamentalist, and is accommodating and tolerant of non Muslim behavior.
State 1: Here the moderate displays behavior like the fundamentalist

The behavior of the non Muslims again has 2 states each randomly assigned by the computer:

State 0: The total self effacing dhimmi whose behavior is acceptable as per the norms set by the fundamentalist (as well as the moderate displaying fundamentalist behavior)

State 1:: The non Muslim who overtly displays non Muslim behavior.

Points scored:

Fundamentalist meets Moderate(0) - Fundamentalist scores 1 as he corrects/punishes the Mod

Fundamentalist meets Moderate(1) - the Fundoo. gets 0 (he thinks he is meeting a fellow fundamentalist) but the Moderate scores 1 since he gets away and can show accommodating behavior elsewhere

Moderate(1) meets non-Muslim(1) - Mod gets 1, NM gets 0 since the moderate showing fundamentalist behavior punishes the non Muslim for showing unacceptable behavior.

Moderate(0) meets Non-Muslim(1), the Mod gets 0 and the NM gets 1 since the non Muslim gets away with his non Islamic behavior

Mod 0 meeting NM 0 - both get 0
Mod 1 meeting NM 0 - both 0 as no action is required.

Fundamentalist meeting Non-Muslim(1) is punished.
Fundamentalist gets 1. NM gets 0

Fundamentalist meeting NM(0) - no action. No points.

All this is in the program logic and is depicted in the following diagram:

Image


I plotted the results in a spreadsheet and got a few graphs - some of which are below with explanations.

Conclusions will be in a separate post and the program itself will be in the final post.
shiv
BRF Oldie
Posts: 34982
Joined: 01 Jan 1970 05:30
Location: Pindliyon ka Gooda

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by shiv »

1. Let me get one thing out of the way. What happens when fundamentalists meet fundamentalists?

In my program - nothing happens. But in reality they play a different game that is easily programmed. The game is called "harm everyone" and is a variant of prisoners' dilemma and a description can be seen at this Wiki link

http://en.wikipedia.org/wiki/Evolutiona ... _and_ESSes

In my program, fundamentalists alone, with NO moderates and NO non Muslims get no points, which is better than what they do to each other in the "harm everyone" game.

2. The next step is to introduce moderates into the population.

The following graph shows how the introduction of moderates shows a rise in points scored by fundamentalists as well as moderates when moderates appear on the scene. Moderates and fundamentalists core points off each other.

Image
---------------------------------------------------------------------
3 Now in this mix of fundamentalists, moderates and non Muslims see what happens if you increase the number of moderates (keeping the other numbers constant). You find that the moderates score rises tremendously - eventually exceeding the fundamentalists score. But everyone's score rises.

Image
----------------------------------------------------------------------------

4. Now see the effect of raising the number of non Muslims, keeping the fundamentalist and modeate numbers constant. Everyone does better as the number of non Muslims rises. But as long as the moderate-fundamentalist ratio is not very high, the fundamentalists score high.

This can bee seen in the following graph
Image
---------------------------------------------------------------------------
5) A very interesting phenomenon occurs when the ratio of maoderates to fundamentalists is high and the number of non Muslims is increased. Everyone's score increases, but the points scored by non Muslim eventually exceeds the points scored by the fundamentalists.

Image
----------------------------------------------------------------------------

5. The last graph shows the effect of changing the ratio of moderates to fundamentalists. If the fundamentalist numbers are increased - either by an absolute increase or by conversion of moderates into fundamentalists what happens is that the moderate and non Muslim points rapidly begin to decline and the points scored by fundamentalists rises sharply - to their delight, I presume.

Image
shiv
BRF Oldie
Posts: 34982
Joined: 01 Jan 1970 05:30
Location: Pindliyon ka Gooda

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by shiv »

Some tentative conclusions an be reached from the results
  • Fundamentalists need at least the presence of moderates to work on and to serve as their raison d'etre. If non Muslims are present so much the better. This seems to indicate that a population of fundamentalists only is a ripe scenario for moderates to arise. Both the fundamentalists and moderates benefit from this evolution.
  • Once moderates are present - there is fertile ground for non Muslims to enter - both as dhimmis and non dhimmis. Everyone benefits from this until the moderates are so high in number that even the non Muslims are scoring higher than the fundamentslists. This is a scenario that the fundamentalists are unlikely to tolerate (unless forced in some way)
  • Fundamentalists can skew the scoring in many ways. One is to directly attack non Muslims. But better than that is to either eliminate moderates or somehow radicalize moderates. Once the moderate to fundamentalist ratio falls, there is a rapid decline in happiness for both moderates and non Muslims.
These conclusions can lead to certain extrapolations.

1) The Moderate Muslim is important. It is essential to encourage the moderate muslim to make life difficult for the fundamentalist.

2) Skewing the moderate-fundamentalist ratio is a useful trick. If the fundamentalists are terrorists - they must be eliminated

3) Dumping large numbers of non Muslims on the ground to can be useful, but of the ratio of moderates to fundamentalists is low - then the benefts wil be small until the ratio is skewed by encouraging moderation and punishing fundamentalism. article 370 comes to mind in this regard.

I will write more comments later.
shiv
BRF Oldie
Posts: 34982
Joined: 01 Jan 1970 05:30
Location: Pindliyon ka Gooda

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by shiv »

The only programming language I know is BASIC. I used to know some Pascal, but have forgooten and am trying to learn Python. But till then it will have to be BASIC.

I wrote about 10 programs and variations in that last couple of weeks - all fairly trivial. I can change the rules of the game in various ways - but many do not make that much of a difference to the conclusions given that the basic rules of interaction are correct.

I will probably add further code later to show what happens to the non Muslims score if they fight and compete with each other accusing one or the other of being a dhimmi and end up scoring off each other.

There are other variation on which the behavior of moderates and dhimmis is not random but is tit for tat. Most of these do not change the basic conclusions much.

Anyhow I post the code of the particular variation that I used to generate the graphs above. It runs in a DOS window in MS Qbasic which is easily and freely downloadable.
REM This program is called slamdun5.bas
REM This program compares the behavior of individuals of one group of people against those of
'another group. There are totally 3 groups of people, fundoos. moderates and dhimmis. Each individual of each 'group is assigned a "behavior" of "0" or "1". However fundoos have "1" behavior only, i.e only fundamentalist 'and this is defined before the first appearance of fundoo in the program. The number of people in each group 'is set manually by answering a question as soon as the program starts. In turn the people of each of the 'groups "moderate" and "dhimmi" are assigned a "0" or "1" behavior randomly. This is then compared with every 'individual of both other groups and scores are totalled. The totals are displayed at the end of the program.

PRINT "-----"
CLEAR
INPUT "Number of fundoos"; mul
INPUT "Number of moderates"; md
INPUT "Number of dhimmis"; dhi

RANDOMIZE TIMER

REM moderate meets dhimmi


REM The function md * dhi gives the total number of interations ("single meetings") between dhimmis and 'moderates assumig that every dhimmi meets every moderate. That sets the number of interactions that the 'program iterates for comparison. The INT function and the line after that ensure that the number is either 1 'or 0

FOR i = 1 TO (md * dhi)

20 moderate = INT(10 * RND)
IF moderate > 1 THEN 20

30 dhimmi = INT(10 * RND)
IF dhimmi > 1 THEN 30


IF moderate = 1 AND dhimmi = 1 THEN dhimmiscore = dhimmiscore + 0
IF moderate = 1 AND dhimmi = 1 THEN moderatescore = moderatescore + 1

IF moderate = 0 AND dhimmi = 0 THEN dhimmiscore = dhimmiscore + 0
IF moderate = 0 AND dhimmi = 0 THEN moderatescore = moderatescore + 0

IF moderate = 0 AND dhimmi = 1 THEN dhimmiscore = dhimmiscore + 1
IF moderate = 0 AND dhimmi = 1 THEN moderatescore = moderatescore + 0

IF moderate = 1 AND dhimmi = 0 THEN dhimmiscore = dhimmiscore + 0
IF moderate = 1 AND dhimmi = 0 THEN moderatescore = moderatescore + 0

NEXT


REM moderate meets mullah

mullah = 1

RANDOMIZE TIMER

FOR i = 1 TO (md * mul)

40 moderate = INT(10 * RND)
IF moderate > 1 THEN 40


IF moderate = 1 AND mullah = 1 THEN mullahscore = mullahscore + 0
IF moderate = 1 AND mullah = 1 THEN moderatescore = moderatescore + 1
IF moderate = 0 AND mullah = 1 THEN mullahscore = mullahscore + 1
IF moderate = 0 AND mullah = 1 THEN moderatescore = moderatescore + 0


NEXT

REM dhimmi meets mullah


FOR i = 1 TO (mul * dhi)

50 dhimmi = INT(10 * RND)
IF dhimmi > 1 THEN 50

IF dhimmi = 1 THEN mullahscore = mullahscore + 1

NEXT


PRINT "-----"
PRINT "mullah gets "; mullahscore
PRINT "random moderate gets "; moderatescore
PRINT "random dhimmi gets "; dhimmiscore
PRINT "-----"

brihaspati
BRF Oldie
Posts: 12410
Joined: 19 Nov 2008 03:25

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by brihaspati »

Shivji,
any thought on payoffs when Moderate(acco) meets Moderate(aggro)? Similarly,
NM(overt) meets NM(covert)?
ramana
Forum Moderator
Posts: 59773
Joined: 01 Jan 1970 05:30

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by ramana »

Thanks Shiv. Very illuminating. need to think through the implications.
Graph 4 and 3 are very important. Graph 4 is TSP before Zia's Islamization and 3 is after his program has gained momentum. Graph 5 shows whats happening currently in TSP. Kashmir is starting to head this way.

Please do add the variations of the NM fights and the effect on the overall population. This will give Indian picture.

Brihsapatiji, When M(0) meets M(1) both become F(1)! Thats the problem of literalists and accomodationists.
samuel
BRFite
Posts: 818
Joined: 03 Apr 2007 08:52

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by samuel »

20 moderate = INT(10 * RND)
IF moderate > 1 THEN 20
What's going on here?

RND is a uniform random number between 0 and 1, is this correct? Then 10*RND is a number between 0 and 10, on the closed interval. Let us say, anything over 1 you reject (first). So, you have an interval (0 1), and 9/10ths of the time, your program is looping over 20 in the search for a moderate between 0 and 1, inclusive. Now for the 1/10 time that you succeed, you INT it. INT returns the integer part. If that is not true, you only have a minor inconvenience. If it is true, a major headache, numerically, moderate is 0 almost surely!

For that, do this: if (RND >0.5) MODERATE = 1 ELSE MODERATE =0


S
shiv
BRF Oldie
Posts: 34982
Joined: 01 Jan 1970 05:30
Location: Pindliyon ka Gooda

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by shiv »

samuel wrote:
20 moderate = INT(10 * RND)
IF moderate > 1 THEN 20
What's going on here?

RND is a uniform random number between 0 and 1, is this correct? Then 10*RND is a number between 0 and 10, on the closed interval. Let us say, anything over 1 you reject (first). So, you have an interval (0 1), and 9/10ths of the time, your program is looping over 20 in the search for a moderate between 0 and 1, inclusive. Now for the 1/10 time that you succeed, you INT it. INT returns the integer part. If that is not true, you only have a minor inconvenience. If it is true, a major headache, numerically, moderate is 0 almost surely!

For that, do this: if (RND >0.5) MODERATE = 1 ELSE MODERATE =0


S

The RND function returns a number less than 1 - and between 0 and 1

In fact that line of code is working well and consistently returns an approximately equal number of ones and zeros. But I haven't checked beyond a small number, Let me try out the code you have suggested anyway.

The RND function also requires a sort of seeding number to be fed and unless that number is different each time you don't get much variation - hence the need to use the computer's timer for getting a different number each time. I am not sure if this is true for all programming languages.

But in reality there is no need for an equal number of 1 and 0 in another trivial variation of the program in which the Moderate or Non Muslim display tit-for-tat behavior after assessing the other person's behavior to score higher.

While such variations skew the actual numbers of points the general directions in which the points go remain the same because the basic assumptions are the same. It is the basic assumptions that need to be correct.
shiv
BRF Oldie
Posts: 34982
Joined: 01 Jan 1970 05:30
Location: Pindliyon ka Gooda

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by shiv »

brihaspati wrote:Shivji,
any thought on payoffs when Moderate(acco) meets Moderate(aggro)? Similarly,
NM(overt) meets NM(covert)?
This is interesting. The programming is trivial if we decide beforehand how they react to each other.

In the assumptions I have used - the moderates can go either way - i.e act fundamentalist or act accommodating randomly.

In this variation of the program a moderate(aggro) meeting another moderate(aggro) would both score 1 point each (or 0 each) because they would both not be breaking any rules and not receive punishment, and both would still be free to be accommodating a a later date.

If a Mod(acco) met another one both would score 0

If a Mod(aggro) met a Mod(acco) then the Mod(aggro) would get 1 point and the Mod (acco) 0.

A similar variation can be made with NM overt and covert, but the rules must be decided.

If overt meets covert who scores? Any ideas. I will incorporate this into another variation.

That would still leave the question of Fundoo meeting Fundoo. I believe that Pakistan today is showing the effects fundoo meeting fundoo. This situaion never gets the fundoos very much. They attack each other (as per the rules of this game). Fundoos score off other people - either moderates or no Muslims. Unless these are changed in an acceptable way nothing would change here.
shiv
BRF Oldie
Posts: 34982
Joined: 01 Jan 1970 05:30
Location: Pindliyon ka Gooda

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by shiv »

ramana wrote:Thanks Shiv. Very illuminating. need to think through the implications.
Graph 4 and 3 are very important. Graph 4 is TSP before Zia's Islamization and 3 is after his program has gained momentum. Graph 5 shows whats happening currently in TSP. Kashmir is starting to head this way.

Please do add the variations of the NM fights and the effect on the overall population. This will give Indian picture..
ramana graph 5 does seem to show what is happening in TSP. In fact TSP is reaching fundoo versus fundoo which is a very bad game for all fundoos although this prorgam does not game that. I did write a program to game that - it is trivial. But if all fundoos score equaly the program gives a 0 for them. If you have 2 groups of fundoos (eg Wahhabi/Barelvi) and give one group higher points - that group rapidly eliminates the other but the game then reverts to one where the dominating group scores 0

But the other thing that the program indicates is that TSP is fertile ground for the rise of moderates. This may explain the new bhaichara we are seeing in some articles.

But TSP plays a complex game in which they behave moderate when faced with fundoos but behave like fundoos when faced with Indians. I need to think thios through and build a suitable model.

As regards interactions of non Muslims, it appears that dhimmis are important because they, like Muslim moderates, can show dual behavior. If dhimmis are eliminated by non dhimmis - then the overall non Muslim score would go down. That is a prediction - but the point scoring will have to be decided for incorporation into the code.

In a game in which the rigid, non accommodating people on both sides eliminate all accommodating people, we would be left with a variation of fundoo vs fundoo

As I see it the best method would be to isolate the Islamic fundamentalists by encouraging moderates, and that encouragement comes from accepting dhimmis as part of the game. That much seems likely from playing this simulation hundreds of times.

The game changing aspect here is that the Islamic fundamentalists "lose" by accepting moderation and they eliminate and punish their own. That is their weak spot. If you can stack Muslim moderates, dhimmis (NM covert) as well as non dhimmi (NM overt) against them - they get isolated.
ramana
Forum Moderator
Posts: 59773
Joined: 01 Jan 1970 05:30

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by ramana »

Shiv, I think this is worth the SRR article and a further one on developing policy options.

Samuel and brihaspati can you guys be peer reviewers?

Thanks,

ramana
samuel
BRFite
Posts: 818
Joined: 03 Apr 2007 08:52

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by samuel »

shiv wrote:The RND function returns a number less than 1 - and between 0 and 1
Yes, it is supposed to be a draw from the uniform distribution.
shiv wrote:In fact that line of code is working well and consistently returns an approximately equal number of ones and zeros.
OK, if that is true, right I see it.

INT(RND*10) will return 0...9, with equal probability. INT f*cks up the same way on the interval. You simply waste 80% of the time looping, but 0 and 1 have equal probability 1/10 each, so that looks like half and half.
shiv wrote:The RND function also requires a sort of seeding number to be fed and unless that number is different
Yes, this is standard. It is a pseudo-random sequence...
samuel
BRFite
Posts: 818
Joined: 03 Apr 2007 08:52

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by samuel »

ramana wrote:Shiv, I think this is worth the SRR article and a further one on developing policy options.

Samuel and brihaspati can you guys be peer reviewers?

Thanks,

ramana
Sure...
samuel
BRFite
Posts: 818
Joined: 03 Apr 2007 08:52

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by samuel »

So, one thing we can further explore is to tie what shiv has put up into an evolutionary game. The more someone scores, the better their fitness, for example.

So, let us suppose that we have a spatial grid of NxN cells, where each cell has a distribution of Mullahs, moderates etc. Every iteration, a random state comes up, where now the state is NxNx3. In each cell depending on what turns up, certain rules apply. At the end scores change. The new scores are renormalized over the grid and become a posterior probability distribution from which we resample the population for the NxN grid. Additionally, population can move to neighoring cells with some probabilities, for example, cells that becomes dominated by fundoos can cause population to move into neighboring cells that aren't. The idea is to see what kinds of patterns form and what the distribution looks like.

This is a variation on the predator-prey problem, where on a grid we start with a random population of perdator and prey. The predators have an aggressiveness "allele" which defines how much prey they can consume in one go. They can also move to adjacent cells with a probability, including if all prey has been exhausted. The question becomes, what does the distribution of alleles look like after N-generations and turns out that predation becomes prudent; the ones not aggressive enough die and the ones far too aggressive eat off all their prey and die.

If we look at distributions of mullahness, aggression, and dhimmitude, we can then ask what natural selection produces as the outcome of this interaction.

S
brihaspati
BRF Oldie
Posts: 12410
Joined: 19 Nov 2008 03:25

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by brihaspati »

Ramanaji, will be glad to do it.

Shivji,
NM(overt)meeting NM(covert) could lead to (0,1) (shame :mrgreen: ).
Fundoo could be divided into two categories Fundoo(dominant) and Fundoo(submissive).
F(sub) can become F(dom) by meeting Mod, or NM - this is another mechanism you can consider - that an interaction changes one party not into the other bu to a third party (increases score of a third party not taking part in the binary interaction).
samuel
BRFite
Posts: 818
Joined: 03 Apr 2007 08:52

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by samuel »

It may be better to think of each species as having a degree of quality with sufficient variability: 0(passive)....1(aggressive), discretized in 0,0.1,...1, say. Initially, this is just a uniform distribution, but via repeated renormalization of scores over the evolution of the system (game), we see what the posterior distribution of the quality looks like.
brihaspati
BRF Oldie
Posts: 12410
Joined: 19 Nov 2008 03:25

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by brihaspati »

Samuelji,
Shivji's model is not considering payoff in the standard sense, it is a map from the set of players into the set of players in keeping with dynamic setup. But a payoff maximizing setup here on top of the evolutionary game will be a conditional game, and still possible.
shiv
BRF Oldie
Posts: 34982
Joined: 01 Jan 1970 05:30
Location: Pindliyon ka Gooda

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by shiv »

samuel wrote: The more someone scores, the better their fitness, for example.

S

In fact this is exactly what I wanted to do - but the coding for that is still experimental. I was attempting to reduce (or increase) the population of any group by a percentage that reflects the amount by which they have scored less (or more) than the opposing group. That would give the "population" of the second generation. This would then have to go through one more iteration of the existing program to create a third generation with new population figures and so on.
samuel
BRFite
Posts: 818
Joined: 03 Apr 2007 08:52

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by samuel »

shiv wrote:
samuel wrote: The more someone scores, the better their fitness, for example.

S

In fact this is exactly what I wanted to do - but the coding for that is still experimental. I was attempting to reduce (or increase) the population of any group by a percentage that reflects the amount by which they have scored less (or more) than the opposing group. That would give the "population" of the second generation. This would then have to go through one more iteration of the existing program to create a third generation with new population figures and so on.
The tools you need are to a) renormalize and b) sample from a distribution.

Allow me to illustrate. Let us say you have a scoring rule within a loop:

if (condition)
score[0] = score[0]+1
else
score[1] = score[1]+1
etc.

Each index in the score array (a vector) is a score that said species got. A species would be mullah=0, dhimmi=1, etc. You could even have a two dimensional array score[0,0], score[0,1]...score[0,k], representing here the the k-traits that a mullah (species 0) can have. Its scoring looks just like the one-dimensional table, just more rules. So at the end of a few epochs (trials), you will have score table or vector.

Then you must renormalize:
- sum up all the values in score.
- divide each element by the sum.
call the renormalized score pscore.

Then you must resample the population from pscore.

To resample, you can use the CDF method or the Hit-miss method, they are the easiest.
The CDF method, useful for vectors, goes like this:

generate a cumulative distribution:
cum[0] = pscore[0];
for i =1:number of species
cum = pscore+cum
end
cum[number of species] = 1 - it is the cumulative sum.

Then, pick a random number between 0 and 1, inclusive.
Find the closest value in cum array to it. use the index of that value as your sample.
Add species sample to population.
Repeat until the population is N (which remains constant between epochs).

in the hit and miss method, which is most useful for higher dimensional arrays, you do this:

sample three numbers from the uniform distribution.
scale the first two numbers, call them m and n, to be between 0 and number of species and 0 and k (number of traits) respectively.
leave the third one between 0 and 1 (assuming you are working with pscore).

if score(m,n) <=pscore(m,n) select species m with trait n else reject.
Do this N times to maintain a population of N, each epoch.

An epoch is a few trials (of the loop), say 100. Otherwise you resample too quickly.

Hope that helps,
S
shiv
BRF Oldie
Posts: 34982
Joined: 01 Jan 1970 05:30
Location: Pindliyon ka Gooda

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by shiv »

samuel wrote: Hope that helps,
S
Phew! :shock:

Yes and no.

I need to read your post several times more.
samuel
BRFite
Posts: 818
Joined: 03 Apr 2007 08:52

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by samuel »

Alright, sorry, let's work through an example then:

There are 4 species Abdul, Babe, Chor and Dentist.
Score[0] is abdul's score
Score[1] is Babe's score
Score[2] is Chor's score
Score[3] is Dentist's score.

You start out with an equal number of the 4 species.
After a few loops of your scoring, you get, let's say:
label AA:
Score[0] = 12
Score[1] = 18
Score[2]= 30
Score[3]= 0

The sum here is 60. So, produce
pscore.

pscore[0] = 12/60 = 0.2
pscore[1]= 18/60 = 0.3
pscore[2] = 30/60 = 0.5
pscore[3] = 0

cum[0] = 0.2
cum[1] = 0.5 (0.2+0.3)
cum[2] = 1
cum[3] = 1

Now do this N times
j = RND (you've seeded this already, assuming)
compare j to 0.2, 0.5 and 1.
Let us say, j = 0.1. Its closest bin is 0.2
so you pick 0 - abdul, add one abdul to your population.
Let's do another try
j = RND
compare j to 0.2 0.5 and 1
let us say it is 0.9
Then you pick 2. Add one chor to your population.
(You will never pick Dentist now;sometimes you may have a rule that all elements must have non zero probability, so if score goes to zero, you might add a small insignificant value...not necessary if species can go extinct).

After N times, you have 20% abduls, 30% babes and 50% chors and no dentists, approximately, in a population of N.

Do your game loop a few times. Repeat everything from label AA:

We can do the 2D example (table of traits and species) with hit-miss later...

S
Last edited by samuel on 28 Jan 2009 11:33, edited 1 time in total.
samuel
BRFite
Posts: 818
Joined: 03 Apr 2007 08:52

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by samuel »

Ok, it's later:

Suppose I have a table score.

Code: Select all

         wus  touchy  snotty   ahole
Abdul   1        1        2          6
Babe    5       10      10         10
Chor    10      10      9          6
Dentist 5        5      5           5
sum it up: 100
normalize to get pscore

Code: Select all

          wus  touchy  snotty   ahole
Abdul   0.01     0.01      0.02       0.06
Babe    0.05     0.10      0.10       0.10
Chor    0.10     0.10      0.09        0.06
Dentist 0.05      0.05      0.05       0.05
Sample randomly from 0...3, call it m
Sample randomly from 0...3, call it n
both m and n are integers.
Sample randomly from 0...1, call it p
p is real number
let us say m = 3, n = 1, p = 0.2
pscore(3,1) = pscore(dentist,touchy) = 0.05 < 0.2; missed - REJECT.
again
let us say m = 1, n = 1, p = 0.05
pscore(1,1) = pscore(babe,touchy) = 0.1 > 0.05; hit - ACCEPT

Add a touchy babe to your population. repeat the sampling process until N samples have been generated (you may have to repeat many many more times than N, because of "misses".

Use new population to score a few times.

OK, hope that helps.
shiv
BRF Oldie
Posts: 34982
Joined: 01 Jan 1970 05:30
Location: Pindliyon ka Gooda

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by shiv »

A bit better Samuel. Let me work on this to fine tune things.
shiv
BRF Oldie
Posts: 34982
Joined: 01 Jan 1970 05:30
Location: Pindliyon ka Gooda

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by shiv »

brihaspati wrote: NM(overt)meeting NM(covert) could lead to (0,1) (shame :mrgreen: ).
Umm - the scoring is not clear to me. Are you suggesting that the NM(overt) gets 0 because the NM(overt) chides him and considers him a "right wing fundoo" who shuld be ashamed?
brihaspati wrote: Fundoo could be divided into two categories Fundoo(dominant) and Fundoo(submissive).
F(sub) can become F(dom) by meeting Mod, or NM - this is another mechanism you can consider - that an interaction changes one party not into the other bu to a third party (increases score of a third party not taking part in the binary interaction).
Here again the logic is not clear. I understand the mechanism that you suggest - but is this feature a real-life observable feature - i.e a fundoo(sub) becoming fundoo(dom). I am unable to think of real life examples of this feature being a significant part of interaction. Could you illustrate with examples?
shiv
BRF Oldie
Posts: 34982
Joined: 01 Jan 1970 05:30
Location: Pindliyon ka Gooda

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by shiv »

Samuel - I will try and work on the CDF method and pass on the hit-miss method because I am not making any game more complex without being able to mentally picture what i am trying to model.

Actually this is going to require some thought-processing - which I do best when I drop the subject for a bit and pick it up again.

What I might do initially is to assign personalities to Fundoos and Dhimmis as brihaspati suggested, and maybe I will have an array with numbered individuals, like dhimmi(1) dhimmi(2) etc.

You guys have suggested tools and methods but I do not yet have a clear picture of a model in my mind of how these elements react with one another based on rules that imitate observable real-life interactions.

The behavior modeled has to be
1) Observable in real life
2) Consistent
3) Predictable.

Having said that - a completely new dynamic has suggested itself to me based on this discussion - i.e the behavior of Pakistan with regard to the US, India and the Taliban. Trying to set up a modeal that plays that game is tempting - but a diversion from the Mod_Fundoo-Dhimmi game.
samuel
BRFite
Posts: 818
Joined: 03 Apr 2007 08:52

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by samuel »

There must be, and is, a more generic way to do the "simple" (not simplistic) games Shiv is working on. Simple because the states have binary. To do that, we need predicate calculus, but only propositional logic.
Aka TRUTH TABLES.

Meaning, all shiv has to do is generate truth tables:
I will give an example of a game with three binary states.

Code: Select all

-State-----score/consequence-----------------
0  1   2      0    1    2
----------------------
0  0   0      +1   0   -1
0  0   1      +0.5 1   -0.9
0  1   0      1     1     1
0  1   1      0     0    0
1  0   0      -2    2    1
1  0   1          etc.
1  1   0
1  1   1
So, state 0 could mean mulla, state 1 could mean dhimmi and state 2 could mean moderate. It could also be much longer. For example, you may have 6-bits, 3 bits for three species, and 3 bits for traits. 0 0 1 0 0 1 could mean an aggressive moderate and 0 0 1 1 0 0 could mean a docile moderate, for example.

At any rate, you produce these truth tables and we can wrap the logic around that, like this.

Sample(pscore, State); (a function that samples from probability distribution pscore randomly).
Logic_Score (State, Truth_table, Score); (A function that applies the truth table to State and produces Score.
Normalize(Score, pscore); (A function that normalizes the score to make it into a probability.

These functions, can be generically written and you, the "game designer" ought to just upload a spreadsheet on a web-page, or something like that, and get back Score and pscore at the end.
ramana
Forum Moderator
Posts: 59773
Joined: 01 Jan 1970 05:30

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by ramana »

Samuel, Can you post the links to Social Sciences with Math that you posted earlier?
Thanks, ramana
brihaspati
BRF Oldie
Posts: 12410
Joined: 19 Nov 2008 03:25

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by brihaspati »

NM(overt)meeting NM(covert) could lead to (0,1). Yes NM(overt) gets 0 because the NM(overt) "chides him and considers him a "right wing fundoo" who should be ashamed", and socially boycotts or penalizes NM(overt). In doing this NM(covert) feels proud and scores.


Fundoo could be divided into two categories Fundoo(dominant) and Fundoo(submissive).
F(sub) can become F(dom) by meeting Mod, or NM. F(sub) meets Mod and realizes that he/she needs to/can assert funda over the Mod and score from satisfaction. But also F(sub) can realize that he/she can gain power by asserting "funda" and would now learn to use it on any lower down the pecking order - this is the trait of F(dom) and thus by this process the F(sub) can convert to F(dom). Thinking of it the "great" Mangal Bagh of recent Peshawar fame, who progressed from a bus-cleaner to a militant commander could be an example.
samuel
BRFite
Posts: 818
Joined: 03 Apr 2007 08:52

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by samuel »

Octave code, may work with matlab. This code will simulate a generic propositional logic game.
In function simulate, you need to specify
nspecies = 4; The number of species
npop = 10; The population per species.
epochs = 10; The number of epochs
statesize = 2; How is interaction defined, between pairs, triplets or more...Set it to 2 for the kinds we do here.

This is the truth table. In the example, the first two columns are the two species pairs that interact, and the last two columns are the corresponding scores they get.
There must be exactly one space between columns of information. its size must be (nspecies choose statesize) rows and 2*statesize columns.
ttable.txt wrote: 1 1 0 0
1 2 0 1
1 3 1 0
1 4 1 1
2 1 1 0
2 2 0 0
2 3 -1 0
2 4 1 -1
3 1 0 1
3 2 0 -1
3 3 0 0
3 4 1 1
4 1 1 1
4 2 1 -1
4 3 1 1
4 4 0 0
This function simulates a game.

Code: Select all

function [scores, pdf] = simulate()
  
  
  reseed();
  nspecies = 4;   
  npop = 10;
  epochs = 10;
  statesize = 2;
  niter = npop*nspecies*epochs;
  ttable = dlmread('ttable.txt',' ');
  sz = size(ttable);
  if (statesize>nspecies)
    disp('Don''t play games');
    return;
  endif;
  
  if (sz(1)< (factorial(4)/factorial(nspecies - statesize)))
    disp('Simulate: Incomplete truth table');
    return;
  endif
  
      
  if (sz(2)~=statesize*2)
    disp('Simulate: Wrong format');
    return;
  endif
  
  initialfreq = ones(1,nspecies);
  scores = zeros(1,nspecies);
  pdf = normalize(initialfreq);
  for i = 1:niter,
    samp = samplepdf(pdf,statesize); %% pull out a pair to interact.
    scores = scores + Logic(ttable,samp,nspecies);
    if (rem(i,epochs)==0)
      mpdf = normalize(scores);
      if(~isempty(mpdf))
        pdf = mpdf;
      endif;
     endif
  endfor;
      
This is the seed for random

Code: Select all

function ans = reseed()
  for i = 1:624,
       v(i) = time+randn*100000;
     endfor
     rand('state',v);
 endfunction
 
This is normalizing scores to be pdfs

Code: Select all

function pscore = normalize(score)
  pscore = [];
  if (var(score) > 0)
    score = score  - min(score(:));
  elseif (score(1) == 0)
    disp('Normalize: Bad idea');
    return;
  endif
  pscore = score./sum(score(:));
endfunction;
  
This function samples from a pdf using the cdf method

Code: Select all

function samp = samplepdf(pdf, nsamp)
  if(nargin ==1) 
    nsamp = 2;
  endif
  
  if (numel(pdf) ~= length(pdf))
    disp('Samplepdf: Need a vector');
    return;
  endif;
  
  if (isempty(pdf)||nsamp==0|| nsamp>length(pdf))
    disp('Samplepdf: Stop messing around');
    return;
  endif;
  
  
  lp = length(pdf); 
 %% Create CDF
 Cdf = zeros(1,lp);
  Cdf(1) = pdf(1);
  for i = 2:lp,
    Cdf(i) = Cdf(i-1)+pdf(i);
  endfor
  samp = zeros(1,nsamp);
  for i = 1:nsamp,  
    indx = find(Cdf>=rand);
    samp(i) = indx(1);
  endfor
endfunction
This function implements the logic in the truth table

Code: Select all

function score = Logic(ttable, state,nsp)
  score = zeros([1 nsp]);
  lens = length(state);
  for i = 1:size(ttable,1)
    matched = 1;
    for j = 1:lens,
      if( ttable(i,j) ~= state(j))
        matched = 0;
      endif
    endfor
    if (matched) 
      score(state) = ttable(i,lens+1:end);
      return;
    endif
  endfor
  disp('Logic: This should never happen');
  
endfunction

      
samuel
BRFite
Posts: 818
Joined: 03 Apr 2007 08:52

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by samuel »

All shiv has to do now is create the truth tables, as shown above.
It will work for pairwise interaction scenarios on vectors. Won't work
for anything else, but extension is easy. I tested it on the example shown
and it should return a final population distribution that is approximately:
0.45740 0.00000 0.09417 0.44843

The initial one is uniform
1/4 1/4 1/4 1/4
samuel
BRFite
Posts: 818
Joined: 03 Apr 2007 08:52

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by samuel »

ramana wrote:Samuel, Can you post the links to Social Sciences with Math that you posted earlier?
Thanks, ramana
On the Geo strat thread? I am not sure which one you are referring to; the stochastic matrix stuff?
samuel
BRFite
Posts: 818
Joined: 03 Apr 2007 08:52

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by samuel »

Please note:
by removing these lines in simulate()
if (rem(i,epochs)==0)
mpdf = normalize(scores);
if(~isempty(mpdf))
pdf = mpdf;
endif;
endif
You get a classical propositional game, where there is no connection between score and fitness of species.
samuel
BRFite
Posts: 818
Joined: 03 Apr 2007 08:52

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by samuel »

One more post and I'll go away for the night...

Someone wanted to do clustering, kasthuri? Could you please post a scheme for gathering data and clustering?
If not, I want to post something on the mutual information measure.

S
shiv
BRF Oldie
Posts: 34982
Joined: 01 Jan 1970 05:30
Location: Pindliyon ka Gooda

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by shiv »

I have been working on another little program - but it is taking longer than I expected, but meanwhile I had a thought.

The game is like this. Pakistan is created out of some Muslim majority area of pre-independence India and is handed over to its leadership.

Now that they have Pakistan, the leadership must convince as many citizens as possible that Pakistan was a good idea and that India is big threat to Pakistan's survival and that India is out to discriminate against all Muslims. Preferably, they would want this idea to spread to all of India's Muslims.

What would Pakistani leaders have to do to foster this feeling?

What would India have to do? What could India do to help Pakistani leaders? What could India do to thwart their aims?

Any thoughts.
brihaspati
BRF Oldie
Posts: 12410
Joined: 19 Nov 2008 03:25

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by brihaspati »

Pakistan simply has to set up complete dominance and supreme state power in the hands of Muslims in an Islamic state incorporating all of the subcontinet as the only target for Muslims.
(1) this helps in reinforcing the psychological aspects of looking back to a "golden age" for Muslims when they are propagandized to have lorded over it all and a return to that dreamland
(2) such a state in the reconstructed myth of past absolute dominance, assures protection from all discrimination from the kaffirs
(3) Pakistani sponsored or indigenously developed groups can take this ideological objective and carry out outrages aimed at showing defiance, derecognition of the non-Islamic state, and taking initiative by Muslims. Any reaction to such outrages by the "kaffir"-state will hopefully alienate more of the Muslims, and turn the fence sitters strongly into the cause. Posing an Islamic state as the supreme achievabel target will find funadamental support in all Muslims exposed to the activities and preachings of the theologians all over the subcontinent.
(4) Since Islam has no problems with fusing politics, military and theology into a single state authority, once the idea is raised, nothing short of this supremely desirable framework for power will be satisfactory. Any move by the Kaffirs to obstruct or weaken the basis for search for this power, can be represented as an attack on Islam itself and therefore can be used to gather increasing support for this agenda.
brihaspati
BRF Oldie
Posts: 12410
Joined: 19 Nov 2008 03:25

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by brihaspati »

Following on from above, anything within modern democratic political practice that India can do goes in favour of this Pakistani agenda. If India concedes, and allows increasing self-assertion, immunity and power to "Muslims" as distinct "Islamic" identity and source of political power, this raises confidence in the propaganda that Islam is destined to rule and the demand for absolute power is the right thing to insist on, as obviously the kaffirs are weak and submissive indicating Allah's will that kaffirs should be subjugated. If India resists, through democratic and legal political framework, then it lends strength to the propaganda that until and unless Islam becomes the supreme state authority, Muslims remain vulnerable to "discrimination" in the sense htat their legitimate aspiration for supreme dominance will be thwarted. Moreover provisions for such democratic and legal resistance can then be represented as an obstruction, and unIslamic.

Can India do anything to really thwart this TSP agenda? Only possibility appears to be the very undemocratic method of dissolving TSP itself and incorporating it as part of kaffir India. First it shows to the "power and military victory justifies Allah's will" line of thought to indicate that "Allah did not will Pakistan to continue". Second, wherever such demands for supreme Islamic state power arise, it can give rise to the potential fear that such demands may prompt retaliation of the order where the basis for such demand for Islamic statehood can itself be jeopardized.
Prem
BRF Oldie
Posts: 21233
Joined: 01 Jul 1999 11:31
Location: Weighing and Waiting 8T Yconomy

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by Prem »

Brihsapati ji,

If i understand the above bttom line , onlee bottom spanking works when dealing with Jihadis then why not dsipense with basic courtsey and go for the shah rag.Time waited is time waisted and weakens the resolve. Is this is what is happening to Indian elites that they are unable to realize long term existential threat by adopting the policy of benign neglect toward home grown "aliens". latyely ,I see a distinct pattern among the Ulemas working in tandem with ummaites forces to weaken India from within. India is not the land of immigrants where distinct identity is brought from mother country and still latched on after hundreds of years.
brihaspati
BRF Oldie
Posts: 12410
Joined: 19 Nov 2008 03:25

Re: Modeling Geostrategic Dynamics for the Indian Subcontinent

Post by brihaspati »

Premji, I have probably started derailing the thread. :D Just briefly will stop here saying that the "Ummaites" are doing this for fear of losing out completely to the "right". In spite of media blitzkrieg, I think they are a bit shaky.
Post Reply