220 likes | 312 Views
Social Network Formation. Consider a number of players (i.e. nodes) needing to decide with whom to connect There can be no more than two connected components The payoff for any node n is 1/m where m is the number of nodes reachable from n What are the Nash equilibria?. Solution.
E N D
Social Network Formation • Consider a number of players (i.e. nodes) needing to decide with whom to connect • There can be no more than two connected components • The payoff for any node n is 1/m where m is the number of nodes reachable from n • What are the Nash equilibria?
Solution • Any graph where half of the nodes are connected to one component and half are connected to the other will form a Nash equilibrium.
Solution • Any graph where half of the nodes are connected to one component and half are connected to the other will form a Nash equilibrium. • Say we have the above situation. Can any one node improve its score by deviating? i.e. by: • Moving from one group to the other? Adding a connection to the other group? Adding a connection to its own group? Removing any/all connections?
Variant • What if we remove the restriction that there can be no more than two components? • Could a Nash equilibrium have any number of components? • Could there be any unbalanced components? • Do any Nash equilibria even exist? • How is this example realistic?
Traffic Game • N travelers from A to B • Two roads • The more congested the road, the slower the commute, regardless of route • The slower the commute, the lower the payoff, regardless of route • Nash equilibria? • Half take one route, half take the other • Can generalize to m routes
Best Response Dynamics • More realistic • How real-life games are typically played out • Not really simultaneous • Games are played repeatedly or continuously • Players adjust strategies over time in response to observations of other players • E.g. a player may either • Not know the various NE • Know the various NE, but needs to observe to find out which one • Traffic example: thousands of NE. Needs to observe other actions to know whether to travel through C or D
NetLogo • Multiagent system • Programming takes the point of view of a number of actors • Interact as directed • Used for modeling complex systems • Can simulate behaviors and explore results under different conditions • Thus we can see how large numbers of socially connected agents behave in a game-like situation • http://ccl.northwestern.edu/netlogo/docs/ • Software, documentation, tutorials
Models Library • Traffic Basic
Network Game • Simulates the social network formation game: • Two clusters • Payoff for each node = 1/n (where n is number of nodes in cluster) • Strategies: • Join cluster 1 • Join cluster 2 • Initially all join cluster 1 • Players update strategy based on information gained previously • Can adjust • Number of nodes • How often nodes update their strategy
Market Game • Number of buyers (blue) and sellers (red) • Single type of item • Buyers and sellers choose initial offers randomly • Buyers incrementally increase purchase offer each tick until a purchase is made • i.e. a seller is found such that os <= ob • Sellers play a game: • Choose best sale price, given other sellers’ prices • Too low: not enough profit per sale • Too high: not enough sales • Sellers measure profit over each period • At the end of each period, make an adjustment
Creating a NetLogo Program • Agents: • Turtles: actors in the multiagent system • Patches: parts (squares) of the ground where turtles can be • Links: links between turtles • Observer: central controller who gives instructions to the other agents • Tick-based • Agent’s actions are defined to take place each “tick” • Speed of ticks adjustable
Standard Starting Point to setup clear-all reset-ticks end to go tick end
Creating Turtles and Displaying Them to setup clear-all setup-turtles reset-ticks end to setup-turtles create-turtles 2 [ set xcor random-xcor set ycor random-ycor ] end to go tick end
Moving Turtles to setup clear-all setup-turtles reset-ticks end to setup-turtles create-turtles 2 [ set xcor random-xcor set ycor random-ycor ] end to go ask turtles [ set xcorxcor + 1 set ycorycor - 1 ] tick end
Creating a Link between Two Turtles to setup clear-all setup-turtles reset-ticks end to setup-turtles create-turtles 2 [ set xcor random-xcor set ycor random-ycor ] ask turtle 0 [ create-link-with turtle 1 ] end to go ask turtles [ set xcorxcor + 1 set ycorycor - 1 ] tick end
Breeds: Buyers and Sellers globals [num-turtles] breed [buyers buyer] breed [sellers seller] to setup clear-all set num-turtles 4 setup-buyers setup-sellers reset-ticks end to setup-buyers set-default-shape buyers "person" create-buyers num-turtles / 2 [ set xcor random-xcor set ycor random-ycor ] end to setup-sellers set-default-shape sellers "person" create-sellers num-turtles / 2 [ set xcor random-xcor set ycor random-ycor ] end to go ask turtles [ set xcorxcor + 1 set ycorycor - 1 ] tick end
Buyer/Seller Negotiation globals [num-turtles total-sales num-sales avg-sale-price] breed [buyers buyer] breed [sellers seller] buyers-own [offer] sellers-own [offer] to setup clear-all set num-turtles 4 setup-buyers setup-sellers reset-ticks end to setup-buyers set-default-shape buyers "person" create-buyers num-turtles / 2 [ set xcor random-xcor set ycor random-ycor set offer random 100 ] end to setup-sellers set-default-shape sellers "person" create-sellers num-turtles / 2 [ set xcor random-xcor set ycor random-ycor set offer random 200 ] end to go let b one-of buyers let s one-of sellers let bprice 0 let sprice 0 ask b [set bprice offer] ask s [set sprice offer] if (bprice >= sprice) [ set num-sales num-sales + 1 set total-sales total-sales + sprice set avg-sale-price total-sales / num-sales ask b [ create-link-with s set offer random 100 ] ask s [ set offer random 200 ] ] ask buyers [set offer offer + 1] ask sellers [set offer offer - 1] tick end
Creating Sliders • Create a slider for number of turtles
Creating a Plot • Plot the average sale price