Great game of Turkey: Difference between revisions

From Opasnet
Jump to navigation Jump to search
(some ideas)
 
(28 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:GovLab]]  
[[Category:GovLab]]  
<rcode label="See the question of the day" embed=1>
 
'''Make today's decision
First, see the issue and possible actions.
 
<rcode label="See the issue of the day" embed=1>
# This code is Op_en7421# on page [[Great game of Turkey]]
# This code is Op_en7421# on page [[Great game of Turkey]]


Line 7: Line 11:
objects.latest("Op_en7421", code_name = "initiate")
objects.latest("Op_en7421", code_name = "initiate")


ques <- question()
temp <- EvalOutput(issueofday)
temp <- temp[temp$Date == as.character(Sys.Date()) , ]


cat(as.character(ques$Description[1]), "\n")
if(nrow(temp@output) == 0) {
cat(as.character(ques$Question[1]), "\n")
cat("Issues have not yet been suggested for today.\n")
} else {
cat(
  "Issue #",
  temp$Issueid[1],
  ":",
  as.character(temp$Issue[1]),  
  "\n",
  as.character(temp$Issuedescription[1]),
  "(", as.character(temp$issuevoteResult)[1],
  "votes).\n"
)


oprint(ques["Option"])


colnames(temp@output)[colnames(temp@output) == "issueofdayResult"] <- "Votes"
oprint(temp[ , c("Action", "Actiondescription", "Actionid", "Votes")], include.rownames = FALSE)
}
</rcode>
</rcode>
Then, make the decision about today's issue.


<rcode name="choices" label="Choose policy" embed=1 variables="
<rcode name="choices" label="Choose policy" embed=1 variables="
name:option|description:Check above the question of the day and decide which option you would choose.|type:selection|options:
name:option|description:Check above the issue of the day and decide which option you would choose.|type:selection|options:
1;Option 1;
1;First option;
2;Option 2;
2;Second option
3;Option 3;
4;Option 4
">
">
# This is code Op_en7421/choices on page [[Great game of Turkey]]
# This is code Op_en7421/choices on page [[Great game of Turkey]]
# Parameters used:
## option: numeric (1 or 2)
library(OpasnetUtils)
objects.latest("Op_en7421", code_name = "initiate")
temp <- EvalOutput(issueofday)
temp <- temp[temp$Date == as.character(Sys.Date()) , ]
if(nrow(temp) == 0 {
cat("Issues have not yet been suggested for today.\n")
} else {
dat <- data.frame(
  Date = temp$Date[option],
  Issue = temp$Issue[option],
  Action = temp$Action[option],
  User = wiki_username,
  Result = as.numeric(Sys.time())
)
opbase.upload(
dat,
ident = "Op_en7421",
name = "Great game of Turkey",
subset = "Decisions",
act_type = "append",
language = "eng",
who = wiki_username
)
oprint(dat, include.rownames = FALSE)
cat("Your choice was successfully saved.\n")
}
</rcode>
== Question ==
What is a good game to crowdsource citizen priorities about daily political decisions in such a way that
* it can be done using a mobile app,
* it characterises happiness of citizen groups of the decisions,
* it characterises progress of important societal values,
* it enables crowdsourcing the actual issues and actions asked?
== Answer ==
=== How to play ===
In this game you get to be the president of Turkey, having to daily make decisions about big and small things. Once a day you choose between two options according to what you would decide about a certain issue. The issue changes daily. Making a decision will cause a change in happiness (see "Happiness") of different population groups and societally important values (see "Values"). Each player will be scored as a decisionmaker based on how they are able to promote happiness and societal values. Players see their own score over time, accompanied by the score of the crowd. The point of the game is to make decisions so that you increase the happiness of different groups as much as possible while also helping to promote important objectives.
'''Getting started
:Before beginning to play, you might consider creating a wiki account, but this is not mandatory. You can do this by clicking "Sign in/Create account" on the top right corner of the page. When you are signed in, you are able to participate in discussions on the possible actions for different issues (See "Suggesting and voting for issues for the issues"). If you do not create an account and play signed in, the IP address for your computer will be used to identify you in the game to keep your score.
:Whether you create yourself a wiki account or not, before you can begin to play, you have to setup your profile. This means choosing which social group you most identify with. There are six groups to choose from: nationalists, liberals, conservatives, minorities, kemalists and other. You can do this in the answer-section, under "Setup profile". You can only belong to one group. You may also change your preferences later. In the beginning you are given 1 bonus to start the game with.
'''Making today's decision
:Making decisions every day about the issue of the day is the basic thing to do in the game. By making a decision about the daily issue, you earn 0.1 bonus. To make a decision about the daily issue, first click "See the issue of the day" on the top of the page to see what the decision is about today and what the options are. After you have read the issue and the options, you can make the decision between the first and second options by choosing the correct one from the drop-down menu below this. Remember to also click on "Choose policy". These decisions will affect how happy you are able to keep the different groups of people (see "Happiness") and how well you are able to promote the different social objectives (see "Values").
'''Suggesting and voting for issues of the day
:You can also affect what the issues voted on will be. Under "Suggest issues and actions" you can submit your own suggestion for an issue for any specific day in the future. You can only suggest one issue for a specific day. If you suggest a new issue for that day, only your newest suggestion will appear in the list. You can also vote for the issue of the day from among the issues already suggested. The suggestion that is ranked highest will become the issue of the day, and the player who suggested it gains 5 bonuses. An issue can be suggested again for a later time point (for example, if it is not played on the first day suggested).
:To vote for an issue first see the issues suggested under "See all suggested issues and actions". You can check the issues suggested for any particular day, or all issues suggested for all days. To vote check the Issueid of the issue you want to vote for and type it into "What is the Issueid (from 'See all actions') of the issue that should be played?" under "Vote for issues and actions". You can only vote for issues on the day they have been suggested for, and only vote for one issue per day. The amount of bonuses you have gathered in the game tells the weight of your vote. If, for example, you have 3 bonuses, your vote equals the votes of three players who all have 1 bonus.
'''Suggesting and voting for actions for the issues
:In the same way as you can suggest and vote for issues of the day, you can also suggest and vote for the action options for any of the issues. The two actions ranked highest will become the options for a certain issue, and the players who suggested them will gain 1 bonus. You can suggest actions for an issue as soon as the issue has been suggested, and the actions can be voted for as soon as they are in the system. The purpose of this is to promote discussion about actions and hence critical evaluation which actions should be upvoted to be played. To participate in the discussion, you need to have a wiki account (see "Getting started" above). You can find the discussions on the "Discussion" tab of this page. You can only vote for one action per issue, and like with voting for issues, the bonuses you have add to the weight of your vote. If an issue is suggested again for a later time point than the original suggestion was, previous related actions and their votes apply.
'''Happiness
:You can also take part in evaluating how much happiness or unhappiness the different actions bring to the social group you belong in, practically meaning how satisfied the people of the group would be if the action was the one chosen. You can do this under "Evaluate happiness and values". Type in the Actionid (you can see this under "See all suggested issues and actions"), and choose from the drop-down menu the happiness score that best describe the amount of happiness the action would bring to your group. You can do this only once per action. Negative scores mean it would decrease happiness within the group. Evaluation of happiness related to an action is possible as soon as the action has been suggested.
:The evaluations of all players are then brought together and are used to determine how much a player is able to increase happiness when making the daily decisions. This, you may remember, is the point of the game.
'''Values
:Aside from happiness, you can also evaluate how much value different actions bring to different objectives. There are five objectives: Civil rights, woman's rights, religion, national values and democracy. Under "Evaluate happiness and values" you can tell how much value different actions bring to different objectives. Value practically means the improving of the conditions having to do with an objective. Type in the Actionid and then choose the objective you want to evaluate and the value the action would bring to it from the drop-down menus. The evaluation of values related to actions is possible as soon as the actions are suggested. You can only evaluate the value once per action and objective.
:The value of each action given to the objective is summarised from all layers the same way as the happiness scores and are used to determine how much it promotes the different social objectives. Making decisions that make things better in respect to these objectives is also the point of the game.
'''Overview of the decisions'''
: In time, you will make a lot of decisions. You can see and overview of these decisions under "Game results" by clicking "Run code". It shows you a graph of a cumulative timeline so that every day your decision will take you up or down in the eyes of different groups (see "Happiness" above) or different objectives (see "Values" above), compared with the majority vote. This gives you an idea of what kind of decisions you have on average made and how you have answered compared to other players. You should try to get the happiness scores of different groups as well as the objectives as high as possible.
=== Game results ===
:''See the top of the page for the main questionnaire of the game. Here we present results from the game.
<rcode embed=1 graphics=1>
#This is code Op_en7421/ on page [[Great game of Turkey]]


library(OpasnetUtils)
library(OpasnetUtils)
library(ggplot2)


objects.latest("Op_en7421", code_name = "initiate")
objects.latest("Op_en7421", code_name = "initiate")
objects.latest("Op_en6007", code_name = "answer") # oggplot etc
BS <- 24
happindex <- EvalOutput(happindex)
valindex <- EvalOutput(valindex)
ggplot(happindex@output, aes(x = Date, y = happinessResult, colour = Group, group = Group)) + geom_point() + facet_grid(Decisionmaker ~ .) + theme_gray(base_size = BS)


ques <- question()
ggplot(valindex@output, aes(x = Date, y = valuesResult, colour = Value, group = Value)) + geom_point() + facet_grid(Decisionmaker ~ .) + theme_gray(base_size = BS)
 
oggplot(happindex, x = "Date", fill = "Group") + facet_wrap(~ User) + labs(title = "Happiness per day") +
theme(axis.text.x = element_text(angle = 90, hjust = 1)) # Turn text and adjust to right
 
happmean <- oapply(happindex, cols = c("Date", "Issue", "Action"), FUN = mean)
happequity <- oapply(happmean, cols = "Group", FUN = sd)
 
oggplot(mergeusers(happmean), x = "Decisionmaker", fill = "Group") + labs(title = "Mean happiness during the whole period")
oggplot(mergeusers(happequity), x = "Decisionmaker") + labs(title = "Deviation from the equity")
 
valmean <- oapply(valindex, cols = c("Date", "Issue", "Action"), FUN = mean)
valequity <- oapply(valmean, cols = "Issue", FUN = sd)
 
oggplot(mergeusers(valmean), x = "Decisionmaker", fill = "Issue") + labs(title = "Mean values over time")
oggplot(mergeusers(progequity), x = "Decisionmaker") + labs(title = "Deviation from the policy balance")
 
</rcode>
 
=== Setup profile ===
 
'''Setup your profile. Do this before you start.
You may change your preferences later.
 
<rcode label="Choose group" embed=1 variables="
name:group|description:Into which group do you identify most? (You only need to choose once)|type:selection|options:
'Nationalists';Nationalists;
'Conservatives';Conservatives;
'Minorities';Minorities;
'Liberals';Liberals;
'Kemalists';Kemalists
">
# This is code Op_en7421/choices on page [[Great game of Turkey]]
# Paramters:
## group: selection (text string)
 
library(OpasnetUtils)


dat <- data.frame(
dat <- data.frame(
Question = ques$Question[1],
User = wiki_username,  
User = wiki_username,  
Result = ques$Option[option] # Option
Group = group,
Result = as.numeric(Sys.time())
)
)


Line 41: Line 185:
ident = "Op_en7421",  
ident = "Op_en7421",  
name = "Great game of Turkey",  
name = "Great game of Turkey",  
subset = "Choices",  
subset = "User",  
act_type = "append",  
act_type = "append",  
language = "eng",  
language = "eng",  
Line 47: Line 191:
)
)


oprint(dat)
oprint(dat, include.rownames = FALSE)
cat("Your choice was successfully saved.\n")
 
cat("Your group was successfully saved.\n")
 
test <- opbase.data("Op_en7421", subset = "Bonuses")$User
if(!wiki_username %in% test) {
dat <- data.frame(
User = wiki_username,
Reason = "Seed",
Bonus = 1,
Result = as.numeric(Sys.time())
)
 
opbase.upload(
dat,
ident = "Op_en7421",
name = "Great game of Turkey",
subset = "Bonuses",
act_type = "append",
language = "eng",
who = wiki_username
)
 
oprint(dat, include.rownames = FALSE)
 
cat("Your seed bonus was successfully saved.\n")
}
</rcode>
 
=== See all suggested issues and actions ===
 
<rcode label="See all actions" embed=1 variables="
name:date|description:Issues and actions for which day?|type:date|
name:all|description:Do you want to see a single day or all?|type:selection|
options:FALSE;Show only the selected day;TRUE;Show all days|default:FALSE
">
# This code is Op_en7421# on page [[Great game of Turkey]]
# Parameters:
## date: date type
## all: logical (if TRUE, show all days)
 
library(OpasnetUtils)
 
objects.latest("Op_en7421", code_name = "initiate")
 
allactions <- EvalOutput(allactions)
if(all) temp <- allactions else temp <- allactions[allactions$Date == as.character(date) , ]
colnames(temp@output)[colnames(temp@output) == "allactionsResult"] <- "Votes"
 
if(nrow(temp@output) == 0) {
  cat("Issues not found for that time.\n")
} else {
  for(i in sort(unique(paste(temp$Date, temp$Issueid)))) {
    temp2 <- temp[paste(temp$Date, temp$Issueid) == i , ]
    cat(
      as.character(temp$Date[1]),
      "Issueid",
      as.character(temp2$Issueid[1]),
      ":",
      as.character(temp2$Issue[1]),
      "\n",
      as.character(temp2$Issuedescription[1]),
      "(", as.character(temp$issuevoteResult)[1],
      "votes).\n"
    )
    oprint(temp2[ , c("Action", "Actiondescription", "Actionid", "Votes")], include.rownames = FALSE)
  }
}
</rcode>
</rcode>


<rcode label="Choose group" embed=1 variables="
=== Suggest issues and actions ===
name:group|description:Into which group do you identify most? (You only need to choose once)|type:selection|options:
 
'Nationalists';Nationalists;
{|
'Conservatives';Conservatives;
|
'Minorities';Minorities;
<rcode label="Suggest issue" embed=1 variables="
'Liberals';Liberals;
name:issue|description:What is the issue (decision) that should be played? (briefly)|type:textbox|
'Kemalists';Kemalists
name:description|description:Give a more detailed description.|type:textbox|
name:date|description:When should this issue be played?|type:date
">
">
# This is code Op_en7421/choices on page [[Great game of Turkey]]
# This is code Op_en7421/ on page [[Great game of Turkey]]
# Parameters:
## date: date type. Default: today
## issue: textbox (text string)
## description: textbox(text string)


library(OpasnetUtils)
library(OpasnetUtils)
objects.latest("Op_en7421", code_name = "initiate")
bonus <- EvalOutput(bonuses)
bonus <- result(bonus)[bonus$User == wiki_username]
dat <- data.frame(
Date = as.character(date),
Issue = issue,
Issuedescription = description,
User = wiki_username,
Result = as.numeric(Sys.time())
)
opbase.upload(
dat,
ident = "Op_en7421",
name = "Great game of Turkey",
subset = "Issues",
act_type = "append",
language = "eng",
who = wiki_username
)
oprint(dat, include.rownames = FALSE)
cat("Your issue was successfully saved.\n")


dat <- data.frame(
dat <- data.frame(
Date = as.character(date),
Issue = issue,
User = wiki_username,  
User = wiki_username,  
Date = as.character(Sys.Date()),
Ivotes = bonus,
Result = group # Group
Result = as.numeric(Sys.time())
)
)


Line 73: Line 317:
ident = "Op_en7421",  
ident = "Op_en7421",  
name = "Great game of Turkey",  
name = "Great game of Turkey",  
subset = "User",  
subset = "Issuevote",  
act_type = "append",  
act_type = "append",  
language = "eng",  
language = "eng",  
Line 79: Line 323:
)
)


oprint(dat)
oprint(dat, include.rownames = FALSE)
cat("Your group was successfully saved.\n")
 
cat("The issue was also voted for with your bonuses.\n")
 
</rcode>
</rcode>


== Question ==
|
 
<rcode label="Suggest action" embed=1 variables="
name:issue|description:What is the Issueid (from 'See all actions') of an issue?|type:default|
name:action|description:What is the action you suggest to this issue? (briefly)|type:textbox|
name:description|description:Give a more detailed description.|type:textbox
">
# This is code Op_en7421/ on page [[Great game of Turkey]]
# Parameters:
## issue: numeric (Issueid)
## action: textbox (text string)
## description: textbox (text string)
 
library(OpasnetUtils)
 
objects.latest("Op_en7421", code_name = "initiate")
 
bonus <- EvalOutput(bonuses)
bonus <- result(bonus)[bonus$User == wiki_username]
 
allactions <- EvalOutput(allactions)
issue <- allactions$Issue[allactions$Issueid == issue][1]
 
if(length(bonus) == 0) {
cat("Setup your account first by selecting a group.\n")
} else {
if(length(issue) == 0) {
cat("Issue not found.\n")
} else {
dat <- data.frame(
Issue = issue,
Action = action,
Actiondescription = description,
User = wiki_username,
Result = as.numeric(Sys.time())
)
 
opbase.upload(
dat,
ident = "Op_en7421",
name = "Great game of Turkey",
subset = "Actions",
act_type = "append",
language = "eng",
who = wiki_username
)
 
oprint(dat, include.rownames = FALSE)
 
cat("Your action was successfully saved.\n")
 
dat <- data.frame(
Issue = issue,
Action = action,
User = wiki_username,
Avotes = bonus,
Result = as.numeric(Sys.time())
)
 
opbase.upload(
dat,
ident = "Op_en7421",
name = "Great game of Turkey",
subset = "Actionvote",
act_type = "append",
language = "eng",
who = wiki_username
)
 
oprint(dat, include.rownames = FALSE)


What is a good game to crowdsource citizen priorities about daily political decisions in such a way that
cat("The action was also voted for with your bonuses.\n")
* it can be done using a mobile app,
}
* it characterises happiness of citizen groups of the decisions,
}
* it characterises progress of important societal values,
</rcode>
* it enables crowdsourcing the actual questions and options asked?
|}


== Answer ==
=== Vote for issues and actions ===


:''See the top of the page for the main questionnaire of the game. Here we present results from the game.
{|
|


<rcode embed=1 graphics=1>
<rcode label="Vote for an issue" embed=1 variables="
#This is code Op_en7421/ on page [[Great game of Turkey]]
name:issue|description:What is the Issueid (from 'See all actions') of the issue that should be played?|type:default
">
# This is code Op_en7421/ on page [[Great game of Turkey]]
# Paramters:
## issue: numeric (Issueid)


library(OpasnetUtils)
library(OpasnetUtils)
library(ggplot2)


objects.latest("Op_en7421", code_name = "initiate")
objects.latest("Op_en7421", code_name = "initiate")
objects.latest("Op_en6007", code_name = "answer") # oggplot etc


BS <- 24
bonuses <- EvalOutput(bonuses)
bonus <- result(bonuses)[bonuses$User == wiki_username]
 
temp <- EvalOutput(allactions)
temp <- temp[temp$Date == as.character(Sys.Date()) & temp$Issueid == issue , ]
 
dat <- data.frame(
Date = temp$Date[1],
Issue = temp$Issue[1],
User = wiki_username,
Ivotes = bonus,
Result = as.numeric(Sys.time())
)
 
opbase.upload(
dat,
ident = "Op_en7421",
name = "Great game of Turkey",
subset = "Issuevote",
act_type = "append",
language = "eng",
who = wiki_username
)
 
oprint(dat, include.rownames = FALSE)
 
cat("Your issue vote was successfully saved.\n")
</rcode>
 
|
 
<rcode label="Vote for an action" embed=1 variables="
name:action|description:What is the Actionid (from 'See all actions') of the action you vote for?|type:default
">
# This is code Op_en7421/ on page [[Great game of Turkey]]
# Parameters:
## action: numeric (Actionid)


happindex <- EvalOutput(happindex)
library(OpasnetUtils)
oggplot(happindex, x = "Date", fill = "Group") + facet_wrap(~ User) + labs(title = "Happiness per day") +
theme(axis.text.x = element_text(angle = 90, hjust = 1)) # Turn text and adjust to right


happmean <- oapply(happindex, cols = c("Date", "Question", "Option"), FUN = mean)
objects.latest("Op_en7421", code_name = "initiate")
happequity <- oapply(happmean, cols = "Group", FUN = sd)


oggplot(mergeusers(happmean), x = "User", fill = "Group") + labs(title = "Mean happiness during the whole period")
bonuses <- EvalOutput(bonuses)
oggplot(mergeusers(happequity), x = "User") + labs(title = "Deviation from the equity")
bonus <- result(bonuses)[bonuses$User == wiki_username]


progindex <- EvalOutput(progindex)
temp <- EvalOutput(allactions)
oggplot(progindex, x = "Date", fill = "Issue") + facet_wrap(~ User)+ labs(title = "Progress per day") +
temp <- temp[temp$Date == as.character(Sys.Date()) & temp$Actionid == action , ]
theme(axis.text.x = element_text(angle = 90, hjust = 1)) # Turn text and adjust to right


progmean <- oapply(progindex, cols = c("Date", "Question", "Option"), FUN = mean)
dat <- data.frame(
progequity <- oapply(progmean, cols = "Issue", FUN = sd)
Issue = temp$Issue[1],
Action = temp$Action[1],
User = wiki_username,  
Avotes = bonus,
Result = as.numeric(Sys.time())
)


oggplot(mergeusers(progmean), x = "User", fill = "Issue") + labs(title = "Mean progress over time")
opbase.upload(
oggplot(mergeusers(progequity), x = "User") + labs(title = "Deviation from the policy balance")
dat,  
ident = "Op_en7421",  
name = "Great game of Turkey",
subset = "Actionvote",
act_type = "append",
language = "eng",
who = wiki_username
)


</rcode>
oprint(dat, include.rownames = FALSE)


== Rationale ==
cat("Your action vote was successfully saved.\n")


<t2b name="Questions" index="Date,Question,Description" obs="Option" unit="-">
</rcode>
2016-01-16|Should the scarf ban in the universities be abandoned?|Since Kemal Atatürk, scarfs have been banned in universities. Now this policy is being re-evaluated.|Yes
|}
2016-01-16|Should the scarf ban in the universities be abandoned?||Partly
2016-01-16|Should the scarf ban in the universities be abandoned?||No
2016-01-17|Should the military budget be increased?|The political and military situation in Syria and areas nearby have become more difficult during the last 12 months.|Yes
2016-01-17|Should the military budget be increased?||No, keep the same
2016-01-17|Should the military budget be increased?||No, reduce
2016-01-17|Should the education budget be increased?||Yes
2016-01-17|Should the education budget be increased?|X % of the young people in Turkey do not receive any education except the primary school. Education is a known determinant of social improvement, but it is also expensive.|No, keep the same
2016-01-17|Should the education budget be increased?||No, reduce
2016-01-18|Should the presidential palace be made to a public place?|President Erdogan built a presidential palace with more than a thousand rooms. Should it be opened up to the public instead of being in president's private use?|Yes
2016-01-18|Should the presidential palace be made to a public place?||No
2016-01-18|What should be done to the immigration situation near the Syrian border?|The was in Syria has made millions of people to flee from the area.|Increase refugee camps and ask for money from the EU.
2016-01-18|What should be done to the immigration situation near the Syrian border?||Force people from Syria to go back.
2016-01-18|What should be done to the immigration situation near the Syrian border?||Ask military help from the US and Nato.
2016-01-18|What should be done to the immigration situation near the Syrian border?||Fight the illegal refugee transport from Turkey across the Mediterranean.
2016-01-18|What should be done to the immigration situation near the Syrian border?||Attack Russia verbally because it helps the Syrian government and prolongs the war.
2016-01-18|What should be done to the immigration situation near the Syrian border?||Fight the Kurds in Syria but silently so that western allies do not get mad.
2016-01-19|How should terrorist attack be prevented?|Homeland security may be compromised in touristic areas because of terrorist attacks.|Increase guards in tourist areas.
2016-01-19|How should terrorist attack be prevented?||Increase guards on the streets.
2016-01-19|How should terrorist attack be prevented?||Increase international collaboration.
2016-01-19|How should terrorist attack be prevented?||Do as before.
</t2b>


=== Calculations ===
=== Evaluate happiness and values ===


{|
|
<rcode name="happiness" label="Save your happiness score" embed=1 variables="
<rcode name="happiness" label="Save your happiness score" embed=1 variables="
name:option|description:Select an option|type:selection|options:
name:action|description:What is the Actionid (from 'See all actions') of the action you want to score?|type:default|
1;Option 1;
2;Option 2;
3;Option 3;
4;Option 4|
name:group|description:Select a group|type:selection|options:
'Nationalists';Nationalists;
'Conservatives';Conservatives;
'Minorities';Minorities;
'Liberals';Liberals;
'Kemalists';Kemalists|
name:hscore|description:How much happiness would this option bring to this group?|type:selection|options:
name:hscore|description:How much happiness would this option bring to this group?|type:selection|options:
NA;- choose score -;2;+2;1;+1;0;0;-1;-1;-2;-2|default:NA
NA;- choose score -;2;+2;1;+1;0;0;-1;-1;-2;-2|default:NA
">
">
# This is code Op_en7421/happiness on page [[Great game of Turkey]]
# This is code Op_en7421/happiness on page [[Great game of Turkey]]
# Parameters:
## action: numeric (Actionid)
## hscore: numeric (integer from -2 to 2)


library(OpasnetUtils)
library(OpasnetUtils)
Line 177: Line 513:
objects.latest("Op_en7421", code_name = "initiate")
objects.latest("Op_en7421", code_name = "initiate")


ques <- question()
temp <- EvalOutput(allactions)
temp <- temp[temp$Actionid == action , ]
cat(as.character(temp$Issue), ":", as.character(temp$Action), "\n")


cat(as.character(ques$Question[1]), "\n")
user <- EvalOutput(user)
 
user1 <- user[user@output$User == wiki_username , ]
oprint(ques["Option"])


dat <- data.frame(
dat <- data.frame(
Question = ques$Question[1],
Issue = temp$Issue[1],
Option = ques$Option[option],
Action = temp$Action[1],
Group = group,
Group = user1$Group[1],
User = wiki_username,  
User = user1$User[1],  
Result = hscore # Hscore
Hscore = hscore, # Happiness score
Result = as.numeric(Sys.time())
)
)


Line 201: Line 539:
)
)


oprint(dat)
oprint(dat, include.rownames = FALSE)
cat("Your happiness score was successfully saved.\n")
cat("Your happiness score was successfully saved.\n")


</rcode>
</rcode>


<rcode name="progress" label="Save your progress score" embed=1 variables="
|
name:option|description:Select an option|type:selection|options:
 
1;Option 1;
<rcode name="value" label="Save your value score" embed=1 variables="
2;Option 2;
name:action|description:What is the Actionid (from 'See all actions') of the action you want to score?|type:default|
3;Option 3;
name:value|description:Select an objective to evaluate|type:selection|options:
4;Option 4|
name:issue|description:Select an issue|type:selection|options:
'Civil Rights';Civil Rights;
'Civil Rights';Civil Rights;
'Women´s Rights';Women´s Rights;
'Women´s Rights';Women´s Rights;
'Religion';Religion;
'Religion';Religion;
'National Values';National Values;
'National Values';National Values;
'Democracy';Democracy|
'Democracy';Democracy;
name:pscore|description:How much progress would this option bring to this issue?|type:selection|options:
'Other';Other|
name:vscore|description:How much value would this action bring?|type:selection|options:
NA;- choose score -;2;+2;1;+1;0;0;-1;-1;-2;-2|default:NA
NA;- choose score -;2;+2;1;+1;0;0;-1;-1;-2;-2|default:NA
">
">
# This is code Op_en7421/progress on page [[Great game of Turkey]]
# This is code Op_en7421/value on page [[Great game of Turkey]]
# Parameters:
## action: numeric (Actionid)
## value: selection (text string)
## vscore: numeric (integer from -2 to 2)


library(OpasnetUtils)
library(OpasnetUtils)
Line 227: Line 568:
objects.latest("Op_en7421", code_name = "initiate")
objects.latest("Op_en7421", code_name = "initiate")


ques <- question()
temp <- EvalOutput(allactions)
temp <- temp[temp$Actionid == action , ]


cat(as.character(ques$Question[1]), "\n")
cat(as.character(temp$Issue), ":", as.character(temp$Action), "\n")
 
oprint(ques["Option"])


dat <- data.frame(
dat <- data.frame(
Question = ques$Question[1],
Issue = temp$Issue[1],
Option = ques$Option[option],
Action = temp$Action[1],
Issue = issue,
Value = value,
User = wiki_username,  
User = wiki_username,  
Result = pscore # Pscore
Vscore = vscore,
Result = as.numeric(Sys.time())
)
)


if(!is.na(pscore)) {
if(!is.na(vscore)) {
opbase.upload(
opbase.upload(
dat,  
dat,  
ident = "Op_en7421",  
ident = "Op_en7421",  
name = "Great game of Turkey",  
name = "Great game of Turkey",  
subset = "Progress",  
subset = "Values",  
act_type = "append",  
act_type = "append",  
language = "eng",  
language = "eng",  
who = wiki_username
who = wiki_username
)
)
oprint(dat)
oprint(dat, include.rownames = FALSE)
cat("Your progress score was successfully saved.\n")
cat("Your progress score was successfully saved.\n")
} else {
} else {
Line 257: Line 598:
}
}
</rcode>
</rcode>
|}


<rcode label="See all questions of the day" embed=1>
== Rationale ==
# This code is Op_en7421/ on page [[Great game of Turkey]]


library(OpasnetUtils)
There is no need to edit the wiki page. Everything can be written into the text slots and uploaded by pressing the respective buttons. You can also create a full day's simulated activity in tables and copy-paste those directly. There is an example file that I used for uploading today's game at the end of the page.


ques <- opbase.data("Op_en7421.questions")
=== Calculations ===
colnames(ques)[colnames(ques) == "Result"] <- "Option"


questions <- unique(as.character(ques$Question[ques$Date == as.character(Sys.Date())]))
<rcode embed=1 label="Append data to database (for developers only)" variables="
 
name:subset|description:What is the database table?|type:text|
for(i in questions) {
name:dat|description:Insert data as table|type:table
  cat(as.character(ques$Description[ques$Question == i][1]), "\n\n")
  cat(as.character(ques$Obs[ques$Question == i][1]), ": ", i, "\n")
  oprint(ques[ques$Question == i , "Option", drop = FALSE])
}
 
</rcode>
 
<rcode label="Vote for the day's question" embed=1 variables="
name:question|description:Give the number of the question you want for today.|type:text
">
">
# This is code Op_en7421/ on page [[Great game of Turkey]]
#This is code Op_n7421/ on page [[Great game of Turkey]]
# Parameters:
## subset: text (name of the Opasnet Base table)
## dat: table (automatically onverts to data.frame. Must have the structure of the database table)


library(OpasnetUtils)
library(OpasnetUtils)


ques <- opbase.data("Op_en7421.questions")
colnames(dat) <- as.matrix(dat)[1 , ]
question <- as.character(ques$Question[ques$Obs == question])
dat <- dat[2:nrow(dat) , ]
 
oprint(dat)
dat <- data.frame(
Date = as.character(Sys.Date()),
User = wiki_username,
Result = question # Question
)


opbase.upload(
opbase.upload(
Line 296: Line 625:
ident = "Op_en7421",  
ident = "Op_en7421",  
name = "Great game of Turkey",  
name = "Great game of Turkey",  
subset = "Question_vote", # You MUST spell it with _
subset = subset,  
act_type = "append",  
act_type = "append",  
language = "eng",  
language = "eng",  
Line 302: Line 631:
)
)


oprint(dat)
cat("Data uploaded successfully.\n")
</rcode>


cat("Your question vote was successfully saved.\n")


</rcode>
<rcode name="initiate" label="Initiate objects (for developers only)" embed=1>
 
# This is code Op_en7421/initiate on page [[Great game of Turkey]]
<rcode label="Vote for a question's option" embed=1 variables="
name:option|description:Give the number of the option you want for today (up to 4 options used).
">
# This is code Op_en7421/ on page [[Great game of Turkey]]


library(OpasnetUtils)
library(OpasnetUtils)


ovote <- opbase.data("Op_en7421.questions")
issueofday <- Ovariable("issueofday",
ovote$Obs <- as.character(ovote$Obs)
  dependencies = data.frame(Name = "allactions"),
  formula = function (...) {
    first <- TRUE
    for (i in unique(allactions$Date)) {
      test <- allactions[allactions$Date == i, ]
      test <- test[order(-test$issuevoteResult), ][1, ]
      if (first)
        issday <- test
      else issday <- combine(issday, test)
      first <- FALSE
    }
    issday <- issday[, c("Date", "Issue")]
    first <- TRUE
    for (i in unique(allactions$Issueid)) {
      test <- allactions[allactions$Issueid == i, ]
      test <- test[order(-result(test)), ][1:min(2,nrow(test@output)), ]
      if (first)
        actday <- test
      else actday <- combine(actday, test)
      first <- FALSE
    }
    actday <- actday[!is.na(actday$Action) , ]
    out <- merge(issday, actday, all.x = TRUE)[ , c("Date", "Issue", "Action")]
    out <- merge(out, allactions)
    out@name <- "allactions"
    return(out)
  }
)


dat <- data.frame(
# Day is only selected afterwards. Action and issue selection based on votes is done in issueofday.
   Question = ovote$Question[ovote$Obs == option],
allactions <- Ovariable("allactions",
  User = wiki_username,  
  dependencies = data.frame(Name = c("issues", "issuevote", "actions", "actionvote")),
  Result = ovote$Result[ovote$Obs == option] # Option
   formula = function(...) {
   
    issues$Issueid <- 1:length(result(issues))
    iss <- oapply(issuevote, cols = "User", FUN = sum) # Sum votes for each issue across users
    iss <- merge(issues, iss, all.x = TRUE)
    iss$issuevoteResult[is.na(iss$issuevoteResult)] <- 0
    iss <- unkeep(iss, sources = TRUE)
    iss$User <- NULL
   
    actions$Actionid <- 1:length(result(actions))
    act <- oapply(actionvote, cols = "User", FUN = sum)
    act <- merge(actions, act, all.x = TRUE)
    act$actionvoteResult[is.na(act$actionvoteResult)] <- 0
    act <- unkeep(act, sources = TRUE)
    act$User <- NULL
    out <- merge(iss, act, all.x = TRUE)
    out@name <- "actionvote"
    return(out)
  }
)
)


opbase.upload(
dat,
ident = "Op_en7421",
name = "Great game of Turkey",
subset = "Option_vote",
act_type = "append",
language = "eng",
who = wiki_username
)


oprint(dat)
# Columns that determine unique rows in tables
# Issues: Date,Issue # Could also be Date,User but let's allow people suggest more than one but vote only one.
# Actions: Issue,Action # Could also be Issue,User but same as above.
# Issuevote: Date,User
# Actionvote: Issue,User
# Happiness: Action,User
# Values: Action,Value,User
# User: User
# Bonuses: User,Reason
# Decisions: Date,User
 
# Tables in which a column determines unique rows
# Date: always
# Issue: Yes Issues, Actions, Actionvote; No Issuevote, Happiness, Values, Decisions
# Action: Yes Actions, Values, Happiness; No Actionvote, Decisions
# User: always but Issues, Actions
# Value: Always
# Reason: always


cat("Your option vote was successfully saved.\n")
uniques <- function(subs) {
  #Create a temporary ovariable temp and fetch the respective table with ddata.
  #indices that are used to find unique rows:
  uncolumns <- c("Date", "Issue", "Action", "User", "Value", "Reason")
  #However, take away indices as listed above.
  addindex <- NULL
  if(subs %in% c("Issuevote", "Happiness", "Values", "Decisions")) addindex <- c(addindex, "Issue")
  if(subs %in% c("Actionvote", "Decisions")) addindex <- c(addindex, "Action")
  if(subs %in% c("Issues", "Actions")) addindex <- c(addindex, "User")
  uncol <- uncolumns[!uncolumns %in% addindex]
  #indices that are transformed to Result:
  rescolumns <- c("Ivotes", "Avotes", "Bonus", "Vscore", "Hscore")
 
  dat <- opbase.data("Op_en7421", subset = subs)
  for(i in colnames(dat)[colnames(dat) %in% uncolumns]) dat <- dat[!is.na(dat[[i]]) & dat[[i]] != "NA" , ]
  temp <- aggregate(dat["Result"], by = dat[colnames(dat) %in% uncol], FUN = max)
  out <- merge(dat, temp["Result"])
  out$Result <- NULL
  colnames(out)[colnames(out) %in% rescolumns] <- "Result"
  if(!"Result" %in% colnames(out)) out$Result <- 1
  out$Result <- as.numeric(as.character(out$Result))
  return(out)  
}


</rcode>
# dummy is needed to get correct marginals in downstream ovariables.
dummy <- Ovariable("dummy",
  data = data.frame(Date=1, Issue=1, Action=1, User=1, Value=1, Group=1, Reason=1, Result=1)
)


You want to find the most popular choice. First, take the last vote of each person. Then calculate the sum of results over all users. Show these popularity sums as the result of object popularity? Select the most popular row among a group defined by an index; use oapply to integrate over the index using which.max and pick that row only. Should this be a function or ovariable?
issues <- Ovariable("issues",
  dependencies = data.frame(Name = c("dummy")),
  formula = function(...) {
    return(uniques("Issues"))
  }
)


* Make a new index where You contains your answers and Crowd contains the most popular vote of everyone.
actions <- Ovariable("actions",  
* Show cumulative scores for happiness and values.
  dependencies = data.frame(Name = c("dummy")),
* Rename terms: problem -> issue, option -> action, issue -> value
  formula = function(...) {
* Only pick two main options for decision.
    return(uniques("Actions"))
* Interface for both issue and action, where the latter depends on the former.  
  }
** Show current issues in the order of popularity.
)
** Ask for new issues.
** Show current issues and their actions in order of popularity.
** Ask for new actions.
** Person's bonus points are used as the starting point for votes.


Add a table about person's points.
issuevote <- Ovariable("issuevote",
Add Iscore to Question vote and Ascore to Option score. When a person votes, their bonus score is used.
  dependencies = data.frame(Name = c("dummy")),
  formula = function(...) {
    return(uniques("Issuevote"))
  }
)


Interface for both issues and actions.
actionvote <- Ovariable("actionvote",
  dependencies = data.frame(Name = c("dummy")),
  formula = function(...) {
    return(uniques("Actionvote"))
  }
)


decisions <- Ovariable("decisions",
  dependencies = data.frame(Name = c("dummy")),
  formula = function(...) {
    return(uniques("Decisions"))
  }
)


<rcode name="initiate" label="Initiate objects (for developers only)" embed=1>
values <- Ovariable("values",
# This is code Op_en7421/initiate on page [[Great game of Turkey]]
  dependencies = data.frame(Name = c("dummy")),
  formula = function(...) {
    return(uniques("Values"))
  }
)


library(OpasnetUtils)
happiness <- Ovariable("happiness",
  dependencies = data.frame(Name = c("dummy")),
  formula = function(...) {
    return(uniques("Happiness"))
  }
)


question <- function() {
bonuses <- Ovariable("bonuses",
   if(!exists("today")) today <- as.character(Sys.Date())
   dependencies = data.frame(Name = c("dummy")),
  ques <- opbase.data("Op_en7421.questions")
  formula = function(...) {
 
    dat <- opbase.data("Op_en7421", subset = "Bonuses")
  qvote <- opbase.data("Op_en7421.question_vote")
    dat$Bonus <- as.numeric(as.character(dat$Bonus))
  colnames(qvote)[colnames(qvote) == "Result"] <- "Question"
    dat <- aggregate(dat["Bonus"], by = dat["User"], FUN = sum)
  qvote <- unique(qvote[qvote$Date == today , ]) # Remove double votes
    colnames(dat)[colnames(dat) == "Bonus"] <- "Result"
  qvote <- aggregate(qvote["User"], by = qvote["Question"], FUN = length)
    return(dat)
  qvote <- qvote[order(qvote$User, decreasing = TRUE) , ][1,] # Choose the row with most votes
  }
 
)
  temp <- merge(ques, qvote)[1 , c("Question", "Description")]


  # Find the most popular options
user <- Ovariable("user",
 
   dependencies = data.frame(Name = c("dummy")),
  ovote <- opbase.data("Op_en7421.option_vote")
   formula = function(...) {
   colnames(ovote)[colnames(ovote) == "Result"] <- "Option"
    return(uniques("User"))
  ovote <- ovote[nrow(ovote):1 , ] #Turn newest first
   }
  #ovote <- ovote[!duplicated(ovote[c("Date", "User") , ]) , ] # Only keep the last vote
)
   out <- merge(temp, ovote)
  out <- aggregate(out["User"], by = out[c("Question", "Description", "Option")], FUN = length)
   out <- out[order(out$User, decreasing = TRUE) , ][1:4,] # Choose the 4 rows with most votes
  out <- out[!is.na(out$User) , ]
  out$User <- NULL
 
  return(out)
}


mergeusers <- function(happ) {
mergeusers <- function(happ) {
   if(length(happ$User) != length(happ$User[happ$User == wiki_username])) {
   if(length(happ$User) != length(happ$User[happ$User == wiki_username])) {
     test1 <- happ[happ$User == wiki_username , ]
     happ$Decisionmaker <- ifelse(happ$User == wiki_username, "You", "Crowd")
    test1$User <- "You"
    test2 <- happ[happ$User != wiki_username , ]
    test2$User <- "Others"
    happ <- combine(test1, test2)
   }
   }
   return(happ)
   return(happ)
}
}


happiness <- Ovariable("happiness", ddata = "Op_en7421.happiness", getddata = FALSE)
deci <- Ovariable("deci",
progress <- Ovariable("progress", ddata = "Op_en7421.progress", getddata = FALSE)
  dependencies = data.frame(Name = "decisions"),
 
  formula = function(...) {
choices <- Ovariable("choices",
    deci <- mergeusers(decisions)
dependencies = data.frame(Name = "happiness"),
    deci <- oapply(deci, cols = "User", FUN = length)
formula = function(...) {
    for(i in unique(paste(deci$Date, deci$Issue))) {
  dat <- opbase.data("Op_en7421.choices")
      test <- deci[paste(deci$Date, deci$Issue) == i , ]
  colnames(dat)[colnames(dat) == "Result"] <- "Option"
      test <- test[order(-test$decisionsResult) , ][1 , ] # Choose the 1 row with most decisions
  dat$Obs <- NULL
      if(exists("out365")) out365 <- combine(out365, test) else out365 <- test
  dat$Result <- 1
    }
  return(dat)
    return(out365)
}
  }
)
)


questions <- Ovariable("questions",  
happindex <- Ovariable("happindex",  
dependencies = data.frame(Name = "happiness"),
  dependencies = data.frame(Name = c(
formula = function(...) {
    "happiness",
  dat <- opbase.data("Op_en7421.questions")
    "deci",
  colnames(dat)[colnames(dat) == "Result"] <- "Option"
    "actions"
  dat$Obs <- NULL
  )),
  dat$Result <- 1
  formula = function(...) {
  return(dat)
    actions$User <- NULL
}
    happindex <- oapply(happiness, cols = "User", FUN = mean)
    happindex <- deci * happindex * actions
    return(happindex)
  }
)
)


happindex <- Ovariable("happindex",  
valindex <- Ovariable("valindex",  
   dependencies = data.frame(Name = c(
   dependencies = data.frame(Name = c(
     "happiness",
     "values",
     "choices",
     "deci",
     "questions"
     "actions"
    )),
  )),
   formula = function(...) {
   formula = function(...) {
 
    actions$Result <- NULL
     happiness <- oapply(happiness, cols = "User", FUN = mean)
     valindex <- oapply(values, cols = "User", FUN = mean)
     happindex <- choices * happiness * questions
     valindex <- deci * valindex * actions
     return(happindex)
     return(valindex)
   }
   }
)
)


progindex <- Ovariable("progindex",
rm(wiki_username)
dependencies = data.frame(Name = c(
objects.store(list = ls())
  "progress",
cat("Objects", ls(), "stored successfully.\n")
  "choices",
</rcode>
  "questions"
)),
formula = function(...) {


  progress <- oapply(progress, cols = "User", FUN = mean)
=== Structure and functionalities ===
  progindex <- choices * progress * questions
 
  return(progindex)
[[File:Great game data structure.png|thumb|450px|Data structure of the great game. Each blue box is a data table. Arrows show the information flows. Happiness and value performances are calculated based on decisions and scores estimated by the players (or researchers?). ''Upload data'' and ''select newest'' are generic functions needed to operate with the data.]]
}
The content of and use of the data tables is the following:
)
* '''Issues''': List of decisions to be made. A user can suggest only one issue per day. For each day, the most popular issue is taken to the game.
* '''Actions''': List of decision options to be made. A user can suggest only one action per issue. For each time point, two most popular actions are taken to the game. However, the actions in the game may change during the day, if the rank of the issues changes.
* '''Issue vote''': List of votes for each issue. Each user can cast a single vote either for or against an issue. The number of votes a user has equals their bonuses.
* '''Action vote''': List of votes for each action under issues. The voting system is the same as for issues.
* '''Decisions''': List of decisions each user makes from the actions and issues on the game.
* '''Bonuses''': List of bonuses the users have earned during the game. In the beginning, each user has 1 bonus. You can earn bonuses if your actions suggestions gets to be played (+1) or if your issues gets to be played (+5). Every time a user makes a decision, they get +0.1 bonus.
* '''Happiness''': Users' opinions about how much happiness an action brings to their own group.
* '''Values''': Users' opinions about how much value an action brings to a selected group.
* '''Users''': List of users' groups (i.e. to which group each user identifies themselves).


objects.store(list = ls())
The functions needed are the following.
* '''Upload data''': Take the data provided by the user or calculated. Add automatic fields, e.g. ts, user and date. Upload data to the respective table.
* '''Create ovariable''': Download data from a table.  From the data, find the unique rows with a given condition (e.g. discard previous decisions made by a user previously on the same day). Then create an ovariable with the structure needed.
* '''Firstuser''': Check's whether user's wiki_username is found from ''Bonuses''. If not, it is added there and 1 bonus given.


</rcode>
The interface codes used are the following:
* '''Suggest issues''': Ask date, issue and description from user. Date means the date when this issue will be played. Default is today, but user can change that and suggest future issues. Timestamp (ts) come automatically. User is the wiki_username. Upload data to ''Issues table''. No need to check previous entries. Upload user's bonus to ''Issue vote'' as number of votes.
* '''Show issues''': Ask date (today by default) and show all issues and each one's actions listed from the most to least popular. This is necessary for suggesting actions.
* '''Show today's issue''': Ask nothing. Show today's top-ranked issue and its two top-ranked actions. [Calculate the sum of results over all users. Show these popularity sums as the result of object popularity? Select the most popular row among a group defined by an index; use oapply to integrate over the index using which.max and pick that row only. Should this be a function or ovariable?]
* '''Suggest actions''': Ask date, issue, action and description from user. Date is today by default. Ts and user come as previously. If the date-issue pair does not exist in Issues table, give error message. Upload data to ''Actions'' and user's bonus to ''Action vote''.
* '''Vote for issue''': Ask the rank number of the issue as a number. The user can check the numbers with ''Show issues''. Date, user, and ts come automatically. Do ''firstuser''. Votes is the number of user's bonuses and comes from ''Bonuses''. Upload data to ''Issue vote''. Store information about the rank before voting somewhere (as an ovariable or a technical data table?). If the information has changed from the last time, give bonus to the user whose information is now on the top.
* '''Vote for action''': Similar to ''vote for issue'', except that the action number is asked and data is uploaded to ''Action vote''.
* '''Make decision''': Ask the action from the two top choices of the most popular issue using a drop-down list. The options can be seen with ''show today's issue''. Upload data to ''Decisions''.  However, if an issue was the most popular at some point during the day, it is still kept in the issue list. {{comment|# |Is it? How?|--[[User:Jouni|Jouni]] ([[User talk:Jouni|talk]]) 17:21, 7 February 2016 (UTC)}}
* '''Evaluate happiness''': Ask date (today is the default), action number from ''show issues'' for that date, and hscore for happiness score in the user's own group. Ts, user as previously. Check if user has a group in ''Users'' and if not, give an error message to sign up to a group first. Upload data to ''Happiness''.
* '''Evaluate values''': As evaluate happiness, except that unlike group, the value is asked from the user and nothing is checked. Upload data to ''Values''.
* '''Manage profile''': Ask the group to which user identifies themselves. Take user and ts as previously. Add data to ''Users''.
* '''Show results''': This code is divided into several parts:
** '''Show happiness performance''': Ask nothing. From ''Decisions'', take the action of each day; do this separately for ''You'', the user's own decisions, and ''Crowd'', i.e. the most popular action of each day. Combine that with the happiness scores from ''Happiness''. Show cumulative happiness across time for both decision makers.
** '''Show value performance''': Similar to show happiness performance, but for values from ''Values''. It is imprtant to notice that value scores for each action are only partly a matter of opinion and partly a matter of research. Therefore, ideas should be developed how this research is gathered and used.
** ''Show situation''': Show the situation of the current issue: the issue and description, and the two actions and their votes.
** '''Show all issues''': Show all issues and actions and their votes for today.


{| {{prettytable}}
|+'''Structures of the tables.
! Questions || Choices || Happiness || Progress || Question vote || Option vote || User
|- style="vertical-align:top;"
|
* Date
* Question
* Description
* Option
|
* Question
* User
* Option
|
* Question
* Option
* Group
* User
* Hscore
|
* Question
* Option
* Issue
* User
* Pscore
|
* Date
* User
* Question
|
* Question
* User
* Option
|
* User
* Date
* Group
|}


{| {{prettytable}}
{| {{prettytable}}
|+'''Important categories
|+'''Important categories
! Groups for Turkey || Progress categories
! Groups for Turkey || Value categories
|----
|----
|
|
Line 519: Line 922:


{{assessment|moderator=Jouni|ongoing=Yes}}
{{assessment|moderator=Jouni|ongoing=Yes}}
* [[Govlab]]


== Keywords ==
== Keywords ==
Line 527: Line 931:


== Related files ==
== Related files ==
{{#l:Great game of Turkey seed data.ods}} Example data to be copied in for a new day.

Latest revision as of 21:44, 4 March 2016


Make today's decision First, see the issue and possible actions.

+ Show code

Then, make the decision about today's issue.

Check above the issue of the day and decide which option you would choose.:

+ Show code

Question

What is a good game to crowdsource citizen priorities about daily political decisions in such a way that

  • it can be done using a mobile app,
  • it characterises happiness of citizen groups of the decisions,
  • it characterises progress of important societal values,
  • it enables crowdsourcing the actual issues and actions asked?

Answer

How to play

In this game you get to be the president of Turkey, having to daily make decisions about big and small things. Once a day you choose between two options according to what you would decide about a certain issue. The issue changes daily. Making a decision will cause a change in happiness (see "Happiness") of different population groups and societally important values (see "Values"). Each player will be scored as a decisionmaker based on how they are able to promote happiness and societal values. Players see their own score over time, accompanied by the score of the crowd. The point of the game is to make decisions so that you increase the happiness of different groups as much as possible while also helping to promote important objectives.

Getting started

Before beginning to play, you might consider creating a wiki account, but this is not mandatory. You can do this by clicking "Sign in/Create account" on the top right corner of the page. When you are signed in, you are able to participate in discussions on the possible actions for different issues (See "Suggesting and voting for issues for the issues"). If you do not create an account and play signed in, the IP address for your computer will be used to identify you in the game to keep your score.
Whether you create yourself a wiki account or not, before you can begin to play, you have to setup your profile. This means choosing which social group you most identify with. There are six groups to choose from: nationalists, liberals, conservatives, minorities, kemalists and other. You can do this in the answer-section, under "Setup profile". You can only belong to one group. You may also change your preferences later. In the beginning you are given 1 bonus to start the game with.

Making today's decision

Making decisions every day about the issue of the day is the basic thing to do in the game. By making a decision about the daily issue, you earn 0.1 bonus. To make a decision about the daily issue, first click "See the issue of the day" on the top of the page to see what the decision is about today and what the options are. After you have read the issue and the options, you can make the decision between the first and second options by choosing the correct one from the drop-down menu below this. Remember to also click on "Choose policy". These decisions will affect how happy you are able to keep the different groups of people (see "Happiness") and how well you are able to promote the different social objectives (see "Values").

Suggesting and voting for issues of the day

You can also affect what the issues voted on will be. Under "Suggest issues and actions" you can submit your own suggestion for an issue for any specific day in the future. You can only suggest one issue for a specific day. If you suggest a new issue for that day, only your newest suggestion will appear in the list. You can also vote for the issue of the day from among the issues already suggested. The suggestion that is ranked highest will become the issue of the day, and the player who suggested it gains 5 bonuses. An issue can be suggested again for a later time point (for example, if it is not played on the first day suggested).
To vote for an issue first see the issues suggested under "See all suggested issues and actions". You can check the issues suggested for any particular day, or all issues suggested for all days. To vote check the Issueid of the issue you want to vote for and type it into "What is the Issueid (from 'See all actions') of the issue that should be played?" under "Vote for issues and actions". You can only vote for issues on the day they have been suggested for, and only vote for one issue per day. The amount of bonuses you have gathered in the game tells the weight of your vote. If, for example, you have 3 bonuses, your vote equals the votes of three players who all have 1 bonus.

Suggesting and voting for actions for the issues

In the same way as you can suggest and vote for issues of the day, you can also suggest and vote for the action options for any of the issues. The two actions ranked highest will become the options for a certain issue, and the players who suggested them will gain 1 bonus. You can suggest actions for an issue as soon as the issue has been suggested, and the actions can be voted for as soon as they are in the system. The purpose of this is to promote discussion about actions and hence critical evaluation which actions should be upvoted to be played. To participate in the discussion, you need to have a wiki account (see "Getting started" above). You can find the discussions on the "Discussion" tab of this page. You can only vote for one action per issue, and like with voting for issues, the bonuses you have add to the weight of your vote. If an issue is suggested again for a later time point than the original suggestion was, previous related actions and their votes apply.

Happiness

You can also take part in evaluating how much happiness or unhappiness the different actions bring to the social group you belong in, practically meaning how satisfied the people of the group would be if the action was the one chosen. You can do this under "Evaluate happiness and values". Type in the Actionid (you can see this under "See all suggested issues and actions"), and choose from the drop-down menu the happiness score that best describe the amount of happiness the action would bring to your group. You can do this only once per action. Negative scores mean it would decrease happiness within the group. Evaluation of happiness related to an action is possible as soon as the action has been suggested.
The evaluations of all players are then brought together and are used to determine how much a player is able to increase happiness when making the daily decisions. This, you may remember, is the point of the game.

Values

Aside from happiness, you can also evaluate how much value different actions bring to different objectives. There are five objectives: Civil rights, woman's rights, religion, national values and democracy. Under "Evaluate happiness and values" you can tell how much value different actions bring to different objectives. Value practically means the improving of the conditions having to do with an objective. Type in the Actionid and then choose the objective you want to evaluate and the value the action would bring to it from the drop-down menus. The evaluation of values related to actions is possible as soon as the actions are suggested. You can only evaluate the value once per action and objective.
The value of each action given to the objective is summarised from all layers the same way as the happiness scores and are used to determine how much it promotes the different social objectives. Making decisions that make things better in respect to these objectives is also the point of the game.

Overview of the decisions

In time, you will make a lot of decisions. You can see and overview of these decisions under "Game results" by clicking "Run code". It shows you a graph of a cumulative timeline so that every day your decision will take you up or down in the eyes of different groups (see "Happiness" above) or different objectives (see "Values" above), compared with the majority vote. This gives you an idea of what kind of decisions you have on average made and how you have answered compared to other players. You should try to get the happiness scores of different groups as well as the objectives as high as possible.

Game results

See the top of the page for the main questionnaire of the game. Here we present results from the game.

+ Show code

Setup profile

Setup your profile. Do this before you start. You may change your preferences later.

Into which group do you identify most? (You only need to choose once):

+ Show code

See all suggested issues and actions

Issues and actions for which day?:
..

Do you want to see a single day or all?:

+ Show code

Suggest issues and actions

What is the issue (decision) that should be played? (briefly):

Give a more detailed description.:

When should this issue be played?:
..

+ Show code

What is the Issueid (from 'See all actions') of an issue?:

What is the action you suggest to this issue? (briefly):

Give a more detailed description.:

+ Show code

Vote for issues and actions

What is the Issueid (from 'See all actions') of the issue that should be played?:

+ Show code

What is the Actionid (from 'See all actions') of the action you vote for?:

+ Show code

Evaluate happiness and values

What is the Actionid (from 'See all actions') of the action you want to score?:

How much happiness would this option bring to this group?:

+ Show code

What is the Actionid (from 'See all actions') of the action you want to score?:

Select an objective to evaluate:

How much value would this action bring?:

+ Show code

Rationale

There is no need to edit the wiki page. Everything can be written into the text slots and uploaded by pressing the respective buttons. You can also create a full day's simulated activity in tables and copy-paste those directly. There is an example file that I used for uploading today's game at the end of the page.

Calculations

What is the database table?:

Insert data as table:

Cancel

+ Show code


+ Show code

Structure and functionalities

Data structure of the great game. Each blue box is a data table. Arrows show the information flows. Happiness and value performances are calculated based on decisions and scores estimated by the players (or researchers?). Upload data and select newest are generic functions needed to operate with the data.

The content of and use of the data tables is the following:

  • Issues: List of decisions to be made. A user can suggest only one issue per day. For each day, the most popular issue is taken to the game.
  • Actions: List of decision options to be made. A user can suggest only one action per issue. For each time point, two most popular actions are taken to the game. However, the actions in the game may change during the day, if the rank of the issues changes.
  • Issue vote: List of votes for each issue. Each user can cast a single vote either for or against an issue. The number of votes a user has equals their bonuses.
  • Action vote: List of votes for each action under issues. The voting system is the same as for issues.
  • Decisions: List of decisions each user makes from the actions and issues on the game.
  • Bonuses: List of bonuses the users have earned during the game. In the beginning, each user has 1 bonus. You can earn bonuses if your actions suggestions gets to be played (+1) or if your issues gets to be played (+5). Every time a user makes a decision, they get +0.1 bonus.
  • Happiness: Users' opinions about how much happiness an action brings to their own group.
  • Values: Users' opinions about how much value an action brings to a selected group.
  • Users: List of users' groups (i.e. to which group each user identifies themselves).

The functions needed are the following.

  • Upload data: Take the data provided by the user or calculated. Add automatic fields, e.g. ts, user and date. Upload data to the respective table.
  • Create ovariable: Download data from a table. From the data, find the unique rows with a given condition (e.g. discard previous decisions made by a user previously on the same day). Then create an ovariable with the structure needed.
  • Firstuser: Check's whether user's wiki_username is found from Bonuses. If not, it is added there and 1 bonus given.

The interface codes used are the following:

  • Suggest issues: Ask date, issue and description from user. Date means the date when this issue will be played. Default is today, but user can change that and suggest future issues. Timestamp (ts) come automatically. User is the wiki_username. Upload data to Issues table. No need to check previous entries. Upload user's bonus to Issue vote as number of votes.
  • Show issues: Ask date (today by default) and show all issues and each one's actions listed from the most to least popular. This is necessary for suggesting actions.
  • Show today's issue: Ask nothing. Show today's top-ranked issue and its two top-ranked actions. [Calculate the sum of results over all users. Show these popularity sums as the result of object popularity? Select the most popular row among a group defined by an index; use oapply to integrate over the index using which.max and pick that row only. Should this be a function or ovariable?]
  • Suggest actions: Ask date, issue, action and description from user. Date is today by default. Ts and user come as previously. If the date-issue pair does not exist in Issues table, give error message. Upload data to Actions and user's bonus to Action vote.
  • Vote for issue: Ask the rank number of the issue as a number. The user can check the numbers with Show issues. Date, user, and ts come automatically. Do firstuser. Votes is the number of user's bonuses and comes from Bonuses. Upload data to Issue vote. Store information about the rank before voting somewhere (as an ovariable or a technical data table?). If the information has changed from the last time, give bonus to the user whose information is now on the top.
  • Vote for action: Similar to vote for issue, except that the action number is asked and data is uploaded to Action vote.
  • Make decision: Ask the action from the two top choices of the most popular issue using a drop-down list. The options can be seen with show today's issue. Upload data to Decisions. However, if an issue was the most popular at some point during the day, it is still kept in the issue list. ----#: . Is it? How? --Jouni (talk) 17:21, 7 February 2016 (UTC) (type: truth; paradigms: science: comment)
  • Evaluate happiness: Ask date (today is the default), action number from show issues for that date, and hscore for happiness score in the user's own group. Ts, user as previously. Check if user has a group in Users and if not, give an error message to sign up to a group first. Upload data to Happiness.
  • Evaluate values: As evaluate happiness, except that unlike group, the value is asked from the user and nothing is checked. Upload data to Values.
  • Manage profile: Ask the group to which user identifies themselves. Take user and ts as previously. Add data to Users.
  • Show results: This code is divided into several parts:
    • Show happiness performance: Ask nothing. From Decisions, take the action of each day; do this separately for You, the user's own decisions, and Crowd, i.e. the most popular action of each day. Combine that with the happiness scores from Happiness. Show cumulative happiness across time for both decision makers.
    • Show value performance: Similar to show happiness performance, but for values from Values. It is imprtant to notice that value scores for each action are only partly a matter of opinion and partly a matter of research. Therefore, ideas should be developed how this research is gathered and used.
    • Show situation': Show the situation of the current issue: the issue and description, and the two actions and their votes.
    • Show all issues: Show all issues and actions and their votes for today.


Important categories
Groups for Turkey Value categories
  • Nationalists
  • Conservatives
  • Minorities
  • Liberals
  • Kemalists
  • Civil Rights
  • Women's Rights
  • Religion
  • National Values
  • Democracy

See also


Keywords

References


Related files

Great game of Turkey seed data Example data to be copied in for a new day.