amaatouq / netwise

open source project to tackle the problem of long development cycles required to produce software to conduct multi-participant and real-time human experiments online.
1 stars 0 forks source link

Get actual alters rather than alterIds #5

Open amaatouq opened 6 years ago

amaatouq commented 6 years ago

Would it be possible that player.get("alters") return an actual list of player object? This will make it possible, for example, in "Guess the correlation game" to show the alter reactive answer without searching for the otherPlayer in the game object.

amaatouq commented 6 years ago

This is particularly important because it will be very common for those types of experiments to connect people together and have them interact with their neighbors. We should make it very easy for them to do that (without requiring them to use the game object). If this is very hard to do, then at least providing the game designer with helper functions that will go over the alterIds and simplify things.

amaatouq commented 6 years ago

Also, it would be great to rethink a little bit the “alters” functions .. Player object should have “social network” set of helper functions. For example Player.alters.add() and Player.alters.get() which returns and sets alter objects directly .. even if behind the scenes it is dealing with alter ids only .. in Games where there is no network structure (i.e., everyone sees everyone) or something, the experimenter designer can opt to use the game object: game.get(“players”)

npaton commented 6 years ago

player.get("alters") is not something we can easily implement without doing some serious magic, which I don't like much.

But adding a new API for making player "networks" (like Player.alters.add) is totally possible, and a much more reasonable design.

We need to think this through though, try to not limit users to much. While the get/set altersIds solution was not the breath-takingly elegant, it had its charm, in that we were only doing simple array operations (push, remove, filter...) which everyone knows or can master quickly, and that we left implementation open and extremely flexible for whatever exotic player network setup experiments might need. Let's think through various possible network cases together on a call and see what the requirements might be.

On 11 Mar 2018, at 06:31, Abdullah notifications@github.com wrote:

Also, it would be great to rethink a little bit the “alters” functions .. Player object should have “social network” set of helper functions. For example Player.alters.add() and Player.alters.get() which returns and sets alter objects directly .. even if behind the scenes it is dealing with alter ids only .. in Games where there is no network structure (i.e., everyone sees everyone) or something, the experimenter designer can opt to use the game object: game.get(“players”)

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub, or mute the thread.

amaatouq commented 6 years ago

I agree with not making NetWise overly optimized for networks (the same way I am against making NetWise overly optimized for MTurk etc) to ensuring that each api we expose to increase the ease of use of the platform doesn't compromise flexibility of the things that can be done with it.. Let's talk about this in our next meeting.

npaton commented 6 years ago

Abdullah Idea: Have a Network object that manages all network interactions like Network.AddEdge(player1._id, player2._id) or Network.getNeighbours(player1._id, 2) (2nd degree), etc.