Open yukitakahashi1 opened 3 years ago
Hi Yuki,
I am sorry to hear that you encountered issues running your experiment. I have not used this game in any of my own projects and therefore have no experience with its performance in actual experiments with many participants.
In the two-player variants, each move is recorded on the clients' side. Only the recorded move history of player one is used for the group history. Thus, your speculation that there were connection issues might be right. For future experiments, I guess one should store the moves for each player individually (like it is done in the single player variant), and figure out a way to resolve conflicts to determine a group's state of the board.
On recovering moves: One would have to check all recorded moves for plausibility / validity, then reconstruct the board up to the last known plausible / good condition and check if there is one (or a series of) valid moves that get the board to the next recorded move. This will be quite complicated to program and even more tedious to do manually. Maybe it is wise to check if the exact move history is needed to answer your research question. It will be difficult to analyze in any case...
Hi Christian,
Thank you very much for your reply. I do not need the exact move history per se, but I will probably need it because I need the following information: (i) whether a player's move is reversed by the other player and (ii) the number of moves each player made that reduced (and increased) the number of moves required to reach the solution. It would be difficult to obtain these without the exact move history.
If I want to store the moves for each player individually (as in the single-player version), how should I modify the codes (I am sorry, but I am not familiar with javascript)? Or better, would it be possible to store the group moves in the player model so that we can have two identical move histories for each player. We can check if they coincide, and if not, can infer which moves are missing.
And, may I ask a few additional questions?
Hi Christian,
Sorry to write to you again, but may I also ask this issue to the oTree discussion group? Chris may have some ideas on it.
(But I'd still like to have your help on how to edit the javascript so that it stores the moves for each player individually and/or stores the group moves on both sides of the players.)
Hi Yuki,
Of course you can ask anyone for help, but I would recommend to upload your actual code for the experiment to a repository, so that others can check and refer to it directly. That might be especially helpful if you have implemented your custom logic to determine good/bad moves.
I have created a new branch on my repository in which I implement storing both players' moves and comparing them before determining the group outcome. Here is a direct comparison of the code: https://github.com/chkgk/otree_slider_puzzle/compare/store_both_players
To your questions: I am not sure what exactly is going on. I thought that a weak internet connection might be plausible. However, you are right, that the puzzle should not be solvable then. Another issue I see is that the game is reset for a player, if s/he refreshes the browser page mid-game. Currently, the board is not restored to the last known position, but rather starts from scratch. That might also explain why moves differ between players and why one player might have made "impossible" moves, given the other player's state of the board.
Unfortunately, tackling these issues and further developing the game is far outside the scope of my work here. As I said, I am not using this code. I simply wrote it as a starting point when you asked on the Google group. I am afraid that you would have to develop further features yourself or find somebody to do it for you. I really cannot support this much more. That said, it is published under the MIT open source license. You can use, modify, and change every part of the code as you like without having to ask me.
Hi Christian,
I am running an experiment using your slider puzzle as a real effort task and it worked completely fine in the code test. However, when I ran the experiment with real human subjects, the
move_history
variable recorded impossible moves for some subjects. For example:HistoryPt3Rd1.xlsx
, the first move ofpt3.1.group.id_in_subsession==3
is{"from":[1,1],"to":[1,2]}
, which is impossible because the initial board is[[1, 2, None], [7, 5, 3], [8, 4, 6]]
.HistoryPt3Rd6.xlsx
, the third move ofpt3.6.group.id_in_subsession==3
is{"from":[2,1],"to":[1,1]}
, which is impossible because the previous move is{"from":[0,0],"to":[1,0]}
(the initial board is[[5, 1, 3], [4, None, 6], [7, 2, 8]]
).Do you have any idea why this happened and how to recover the original moves (I am using the 2-player version of the puzzle)?
Some possibilities (just speculations):
HistoryPt3Rd1.xlsx HistoryPt3Rd6.xlsx