Great game of Turkey: Difference between revisions
(25 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
'''Make today's decision | '''Make today's decision | ||
First, see the issue and possible actions. | |||
<rcode label="See the | <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 10: | Line 11: | ||
objects.latest("Op_en7421", code_name = "initiate") | objects.latest("Op_en7421", code_name = "initiate") | ||
temp <- EvalOutput(issueofday) | |||
temp <- temp[temp$Date == as.character(Sys.Date()) , ] | |||
cat(as.character( | if(nrow(temp@output) == 0) { | ||
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" | |||
) | |||
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 | name:option|description:Check above the issue of the day and decide which option you would choose.|type:selection|options: | ||
1; | 1;First option; | ||
2; | 2;Second option | ||
"> | "> | ||
# 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) | library(OpasnetUtils) | ||
Line 32: | Line 49: | ||
objects.latest("Op_en7421", code_name = "initiate") | 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(ggplot2) | |||
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) | |||
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( | ||
User = wiki_username, | User = wiki_username, | ||
Result = | Group = group, | ||
Result = as.numeric(Sys.time()) | |||
) | ) | ||
Line 44: | Line 185: | ||
ident = "Op_en7421", | ident = "Op_en7421", | ||
name = "Great game of Turkey", | name = "Great game of Turkey", | ||
subset = " | subset = "User", | ||
act_type = "append", | act_type = "append", | ||
language = "eng", | language = "eng", | ||
Line 50: | Line 191: | ||
) | ) | ||
oprint(dat) | oprint(dat, include.rownames = FALSE) | ||
cat("Your | |||
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> | ||
=== Suggest issues and actions === | |||
<rcode label=" | {| | ||
name: | | | ||
<rcode label="Suggest issue" embed=1 variables=" | |||
name:issue|description:What is the issue (decision) that should be played? (briefly)|type:textbox| | |||
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/ | # 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, | ||
Ivotes = bonus, | |||
Result = as.numeric(Sys.time()) | |||
) | ) | ||
Line 78: | Line 317: | ||
ident = "Op_en7421", | ident = "Op_en7421", | ||
name = "Great game of Turkey", | name = "Great game of Turkey", | ||
subset = " | subset = "Issuevote", | ||
act_type = "append", | act_type = "append", | ||
language = "eng", | language = "eng", | ||
Line 84: | Line 323: | ||
) | ) | ||
oprint(dat) | oprint(dat, include.rownames = FALSE) | ||
cat(" | |||
cat("The issue was also voted for with your bonuses.\n") | |||
</rcode> | </rcode> | ||
== | | | ||
<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) | |||
cat("The action was also voted for with your bonuses.\n") | |||
} | |||
} | |||
</rcode> | |||
|} | |||
== | === Vote for issues and actions === | ||
{| | |||
| | |||
<rcode embed=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) | ||
objects.latest("Op_en7421", code_name = "initiate") | objects.latest("Op_en7421", code_name = "initiate") | ||
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) | |||
library(OpasnetUtils) | |||
objects.latest("Op_en7421", code_name = "initiate") | |||
bonuses <- EvalOutput(bonuses) | |||
bonus <- result(bonuses)[bonuses$User == wiki_username] | |||
temp <- EvalOutput(allactions) | |||
temp <- temp[temp$Date == as.character(Sys.Date()) & temp$Actionid == action , ] | |||
dat <- data.frame( | |||
Issue = temp$Issue[1], | |||
Action = temp$Action[1], | |||
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) | |||
cat("Your action vote was successfully saved.\n") | |||
< | </rcode> | ||
|} | |||
=== | === 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: | name:action|description:What is the Actionid (from 'See all actions') of the action you want to score?|type:default| | ||
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 182: | Line 513: | ||
objects.latest("Op_en7421", code_name = "initiate") | objects.latest("Op_en7421", code_name = "initiate") | ||
temp <- EvalOutput(allactions) | |||
temp <- temp[temp$Actionid == action , ] | |||
cat(as.character( | cat(as.character(temp$Issue), ":", as.character(temp$Action), "\n") | ||
user <- EvalOutput(user) | |||
user1 <- user[user@output$User == wiki_username , ] | |||
dat <- data.frame( | dat <- data.frame( | ||
Issue = temp$Issue[1], | |||
Action = temp$Action[1], | |||
Group = | Group = user1$Group[1], | ||
User = | User = user1$User[1], | ||
Hscore = hscore, # Happiness score | |||
Result = as.numeric(Sys.time()) | |||
) | ) | ||
Line 206: | 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=" | | | ||
name: | |||
<rcode name="value" label="Save your value score" embed=1 variables=" | |||
name:action|description:What is the Actionid (from 'See all actions') of the action you want to score?|type:default| | |||
name:value|description:Select an objective to evaluate|type:selection|options: | |||
name: | |||
'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: | '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/ | # 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 232: | Line 568: | ||
objects.latest("Op_en7421", code_name = "initiate") | objects.latest("Op_en7421", code_name = "initiate") | ||
temp <- EvalOutput(allactions) | |||
temp <- temp[temp$Actionid == action , ] | |||
cat(as.character(temp$Issue), ":", as.character(temp$Action), "\n") | |||
dat <- data.frame( | dat <- data.frame( | ||
Issue = temp$Issue[1], | |||
Action = temp$Action[1], | |||
Value = value, | |||
User = wiki_username, | User = wiki_username, | ||
Result = | Vscore = vscore, | ||
Result = as.numeric(Sys.time()) | |||
) | ) | ||
if(!is.na( | 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 = " | 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 262: | Line 598: | ||
} | } | ||
</rcode> | </rcode> | ||
|} | |||
== 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 === | |||
<rcode label=" | <rcode embed=1 label="Append data to database (for developers only)" variables=" | ||
name:subset|description:What is the database table?|type:text| | |||
name:dat|description:Insert data as table|type:table | |||
"> | "> | ||
# This is code | #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) | ||
colnames(dat) <- as.matrix(dat)[1 , ] | |||
dat <- dat[2:nrow(dat) , ] | |||
oprint(dat) | |||
dat <- | |||
) | |||
opbase.upload( | opbase.upload( | ||
Line 301: | Line 625: | ||
ident = "Op_en7421", | ident = "Op_en7421", | ||
name = "Great game of Turkey", | name = "Great game of Turkey", | ||
subset = | subset = subset, | ||
act_type = "append", | act_type = "append", | ||
language = "eng", | language = "eng", | ||
Line 307: | Line 631: | ||
) | ) | ||
cat("Data uploaded successfully.\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=" | |||
# This is code Op_en7421/ on page [[Great game of Turkey]] | |||
library(OpasnetUtils) | library(OpasnetUtils) | ||
issueofday <- Ovariable("issueofday", | |||
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) | |||
} | |||
) | ) | ||
# Day is only selected afterwards. Action and issue selection based on votes is done in issueofday. | |||
allactions <- Ovariable("allactions", | |||
dependencies = data.frame(Name = c("issues", "issuevote", "actions", "actionvote")), | |||
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) | |||
} | |||
) | ) | ||
# 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 | |||
=== | 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) | |||
} | |||
# 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) | |||
) | |||
issues <- Ovariable("issues", | |||
dependencies = data.frame(Name = c("dummy")), | |||
formula = function(...) { | |||
return(uniques("Issues")) | |||
} | |||
) | |||
actions <- Ovariable("actions", | |||
dependencies = data.frame(Name = c("dummy")), | |||
formula = function(...) { | |||
return(uniques("Actions")) | |||
} | |||
) | |||
issuevote <- Ovariable("issuevote", | |||
dependencies = data.frame(Name = c("dummy")), | |||
formula = function(...) { | |||
return(uniques("Issuevote")) | |||
} | |||
) | |||
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")) | |||
} | |||
) | |||
values <- Ovariable("values", | |||
dependencies = data.frame(Name = c("dummy")), | |||
formula = function(...) { | |||
return(uniques("Values")) | |||
} | |||
) | |||
happiness <- Ovariable("happiness", | |||
dependencies = data.frame(Name = c("dummy")), | |||
formula = function(...) { | |||
return(uniques("Happiness")) | |||
} | |||
) | |||
bonuses <- Ovariable("bonuses", | |||
dependencies = data.frame(Name = c("dummy")), | |||
formula = function(...) { | |||
dat <- opbase.data("Op_en7421", subset = "Bonuses") | |||
dat$Bonus <- as.numeric(as.character(dat$Bonus)) | |||
dat <- aggregate(dat["Bonus"], by = dat["User"], FUN = sum) | |||
colnames(dat)[colnames(dat) == "Bonus"] <- "Result" | |||
return(dat) | |||
} | |||
) | |||
user <- Ovariable("user", | |||
dependencies = data.frame(Name = c("dummy")), | |||
formula = function(...) { | |||
return(uniques("User")) | |||
} | |||
) | |||
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])) { | ||
happ$Decisionmaker <- ifelse(happ$User == wiki_username, "You", "Crowd") | |||
} | } | ||
return(happ) | return(happ) | ||
} | } | ||
deci <- Ovariable("deci", | |||
dependencies = data.frame(Name = "decisions"), | |||
formula = function(...) { | |||
deci <- mergeusers(decisions) | |||
deci <- oapply(deci, cols = "User", FUN = length) | |||
for(i in unique(paste(deci$Date, deci$Issue))) { | |||
test <- deci[paste(deci$Date, deci$Issue) == i , ] | |||
test <- test[order(-test$decisionsResult) , ][1 , ] # Choose the 1 row with most decisions | |||
if(exists("out365")) out365 <- combine(out365, test) else out365 <- test | |||
} | |||
return(out365) | |||
} | |||
) | ) | ||
happindex <- Ovariable("happindex", | |||
dependencies = data.frame(Name = c( | |||
"happiness", | |||
"deci", | |||
"actions" | |||
)), | |||
formula = function(...) { | |||
actions$User <- NULL | |||
happindex <- oapply(happiness, cols = "User", FUN = mean) | |||
happindex <- deci * happindex * actions | |||
return(happindex) | |||
} | |||
) | ) | ||
valindex <- Ovariable("valindex", | |||
dependencies = data.frame(Name = c( | dependencies = data.frame(Name = c( | ||
" | "values", | ||
" | "deci", | ||
" | "actions" | ||
)), | |||
formula = function(...) { | formula = function(...) { | ||
actions$Result <- NULL | |||
valindex <- oapply(values, cols = "User", FUN = mean) | |||
valindex <- deci * valindex * actions | |||
return( | return(valindex) | ||
} | } | ||
) | ) | ||
rm(wiki_username) | |||
objects.store(list = ls()) | |||
cat("Objects", ls(), "stored successfully.\n") | |||
</rcode> | |||
=== Structure and functionalities === | |||
[[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). | |||
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. {{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}} | {| {{prettytable}} | ||
Line 570: | Line 922: | ||
{{assessment|moderator=Jouni|ongoing=Yes}} | {{assessment|moderator=Jouni|ongoing=Yes}} | ||
* [[Govlab]] | |||
== Keywords == | == Keywords == | ||
Line 578: | 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.
Then, make the decision about today's issue.
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.
Setup profile
Setup your profile. Do this before you start. You may change your preferences later.
See all suggested issues and actions
Suggest issues and actions
|
|
Vote for issues and actions
|
|
Evaluate happiness and values
|
|
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
Structure and functionalities
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.
Groups for Turkey | Value categories |
---|---|
|
|
See also
Moderator:Jouni (see all) |
|
Upload data
|
Keywords
References
Related files
Great game of Turkey seed data Example data to be copied in for a new day.