Pnyx: a powerful and user-friendly preference aggregation tool

41
Pnyx A user-friendly tool for preference aggregation. An IDP by Guillaume Chabin [email protected]

Transcript of Pnyx: a powerful and user-friendly preference aggregation tool

Page 1: Pnyx: a powerful and user-friendly preference aggregation tool

Pnyx A user-friendly tool for preference aggregation.

       

An  IDP  by    Guillaume  Chabin  [email protected]  

Page 2: Pnyx: a powerful and user-friendly preference aggregation tool

Agenda ①  Mo;va;ons  

②  Pnyx  features  ③  Pnyx  &  Social  Choice  Theory  ④  What  lies  behind  Pnyx?  

⑤  Future  works  

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   2  

Page 3: Pnyx: a powerful and user-friendly preference aggregation tool

How do we perform a preference aggregation?

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   3  

Page 4: Pnyx: a powerful and user-friendly preference aggregation tool

We have several possible tools

But  none  of  these  are  built  for  polls!    

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   4  

Page 5: Pnyx: a powerful and user-friendly preference aggregation tool

No user-friendly solution to collect and aggregate preferences

Niche  :  Marke;ng  

tools  

Aggrega;on  tools  

Collec;on  tools  

?  

Complete  

Incomplete  

Niche  :  Social  vo;ng   User  oriented  Code  oriented  

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   5  

Niche  :  Elec;on  tools  

Page 6: Pnyx: a powerful and user-friendly preference aggregation tool

No user-friendly solution to collect and aggregate preferences

Complete  

Incomplete  

User  oriented  Code  oriented  

6  

Niche  :  Marke<ng  tools  

Niche  tools:  Social  vo<ng  

Collec<on  tool  Aggrega<on  toll  

Pnyx  •  

Doodle  •  

•  myVote  

•  Show  of  hands  •  voIer  

•  wedgies  

•  Helios  

•  polarb  

Survey  Monkey  •  

•  Limesurvey  

•  tricider  

•  CIVS  •  Simply  Vo<ng  

•  OpaVote   •  ballotbin.com  

Qualtrics  •  

•  democrtarix  

Niche  :    Elec<on  tools  

Page 7: Pnyx: a powerful and user-friendly preference aggregation tool

Pnyx aims to address this need. •  Open  source  &  user-­‐friendly  •  A  unique  tool  from  the  collec;on  to  the  

preference  aggrega;on    

With  Pnyx    

With  other  aggrega;on  tools  

Extract  preference  profile  under  Preflib’s  standards  

Collect  pref.   Build  pref.  profile  (external  tool)  

Aggregate  profile  

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   7  

Page 8: Pnyx: a powerful and user-friendly preference aggregation tool

How do we use Pnyx?

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   8  

Page 9: Pnyx: a powerful and user-friendly preference aggregation tool

General information Pnyx  is  a  web-­‐based  applica<on  •  Currently  deployed  on  a  TUM  server  •  pnyx.dss.in.tum.de  User  data  required:  •  2  different  type  of  users:    

admin  and  voters    •  Pnyx  account  required  for  admins    •  Voter’s  email  address  required  (only  for  

private  polls)  

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   9  

Page 10: Pnyx: a powerful and user-friendly preference aggregation tool

Admin features: Create  a  poll:  

•  Create  a  poll  and  invite  par;cipants  Manage  exis<ng  polls:  

•  Contact  par;cipants  •  Modify  or  delete  a  poll  •  Export  a  preference  profile  

 August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   10  

Page 11: Pnyx: a powerful and user-friendly preference aggregation tool

Poll creation

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   11  

Page 12: Pnyx: a powerful and user-friendly preference aggregation tool

Poll creation (2)

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   12  

Page 13: Pnyx: a powerful and user-friendly preference aggregation tool

Poll creation (3)

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   13  

Page 14: Pnyx: a powerful and user-friendly preference aggregation tool

Poll creation (4)

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   14  

Page 15: Pnyx: a powerful and user-friendly preference aggregation tool

Poll creation (5)

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   15  

Page 16: Pnyx: a powerful and user-friendly preference aggregation tool

Poll creation (6)

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   16  

Page 17: Pnyx: a powerful and user-friendly preference aggregation tool

Voter features No  registra;on  required  

Public  or  individual  links  

2  major  func;onali;es  

•  Access  the  ballot  and  vote  •  See  the  (temporary)  results  

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   17  

Page 18: Pnyx: a powerful and user-friendly preference aggregation tool

Voter features (2)

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   18  

Page 19: Pnyx: a powerful and user-friendly preference aggregation tool

Voter features (3)

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   19  

Page 20: Pnyx: a powerful and user-friendly preference aggregation tool

What if a voter tries to trick Pnyx?

Pnyx  uses  redirec<ons:  

•  Timeframe  viola;on  •  Access  a  private  poll  

without  being  a  par;cipant  •  Vote  twice  •  …  

   

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   20  

Page 21: Pnyx: a powerful and user-friendly preference aggregation tool

Features around Pnyx

Features  related  to  the  account  management  

 About  page  &  contact  us    

 User  Interface  to  interact  with  the  database  

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   21  

Page 22: Pnyx: a powerful and user-friendly preference aggregation tool

Pnyx and SCT

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   22  

Page 23: Pnyx: a powerful and user-friendly preference aggregation tool

Individual preferences Pnyx  supports  5  different  restricted  domains  for  individual  preferences  

 

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   23  

Page 24: Pnyx: a powerful and user-friendly preference aggregation tool

Collective preferences 3  different  output  types  to  aggregate  preference  profiles  

 

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   24  

Page 25: Pnyx: a powerful and user-friendly preference aggregation tool

Selection of the choice rule according a matrix    

     

*   Plurality   Approval  vo<ng  

Borda’s  score  

Bucket  Borda’s  score  

Young’s  scoring  rule  

Random  Dictatorship  

Nash  solu<on  ∆  

Maximal  LoIery  ∆  

Maximal  LoIery  ∆  

Maximal  LoIery  ∆  

Plurality  score  *  

Approval  score  *  

Kemeny’s  rule  ∆  

Kemeny’s  rule  ∆    

Kemeny’s  rule  ∆  

*  <e  breaking  according  a  customized  or  randomized  lexicographic  order  ∆    uncontrolled  <ebreak  

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   25  

Page 26: Pnyx: a powerful and user-friendly preference aggregation tool

Nash’s solution From  Collec.ve  choice  under  dichotomous  preferences,  A.  Bogomolnaia,  H.  Moulin  and  R.  Stong    Maximize  a  collec<ve  u<lity  func<on  Solved  by  convex  op;miza;on:  

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   26  

Page 27: Pnyx: a powerful and user-friendly preference aggregation tool

Nash’s solution (ctd.) Meets  ex-­‐ante  efficiency  :    Meets  fair  welfare  share:  •  Guarantees  a  lower  bound  on  the  u;lity  

of  all  agents  who  are  not  completely  indifferent.  

 Not  strategyproof  (impossibility  result)        

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   27  

Page 28: Pnyx: a powerful and user-friendly preference aggregation tool

Maximal lottery Expected  majority  margin:  

 

 

 

ML  set    is  a  convex  polytope  and  may  be  large:  

•  The  .ebreak  =  get  closer  to  the  center  of  gravity  

 

 

 

 

 

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   28  

Page 29: Pnyx: a powerful and user-friendly preference aggregation tool

Maximal lottery ML  are  mixed  maximin  strategies  of  the  plurality  game  •  Compute  some  ver;ces  with  LP:  

•  Take  the  average            

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   29  

Page 30: Pnyx: a powerful and user-friendly preference aggregation tool

Maximal lottery (2) No  generaliza<on  for  loIery  outcomes:  •  ML  are  Condorcet  extensions  and  not  the    

others  •  Nash’s  solu;on  more  sensi;ve  to  voters  

with  a  low  u;lity  

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   30  

4   3   2  

A   D   B  

B,C,D   A,B,C   A,C,D   44,4  

33,6  

100  

22,2  

32,9  

33,3  

33,4  

0%   20%   40%   60%   80%   100%  

Ran  Dic  

Nash  Sol.  

Max  Lot  

A   B   D  

Page 31: Pnyx: a powerful and user-friendly preference aggregation tool

Kemeny’s rule Kemeny’s  rule  is  NP–complete  

 Computed  by  MIP  

A   B  

C  D  

1  

3  

1  

1  1   1  

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   31  

A   B  

C  D  

1  

3  

1  

1  

1  

1  

0  

0  0

0  

0  

0  

Page 32: Pnyx: a powerful and user-friendly preference aggregation tool

Kemeny’s rule (2) Generaliza<on  among  ranking  outcomes:  

In  theory  

•  Rm  is  transi;ve  on  Ddi  

In  prac;ce  

•  The  ;ebreaking  rule  is  not  controlled  for  Kemeny’s  rule  implementa;on  

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   32  

Page 33: Pnyx: a powerful and user-friendly preference aggregation tool

What lies behind Pnyx?

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   33  

Page 34: Pnyx: a powerful and user-friendly preference aggregation tool

Lp  solver:  GLPK  

Backen

d  

Web  framework  

Django    

Python  package  

Fron

tend

 

Data  base  

jQuery  JavaScript  library    

Bootstrap    HTML  &  CSS-­‐based  design  templates

 

Template  layer  

View    layer  

Model    layer  

others   Numpy   cvxopt   puLP  

A global picture of Pnyx

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   34  

Page 35: Pnyx: a powerful and user-friendly preference aggregation tool

Next steps? Technical topics

Improve  the  database  interface  

Fixe  some  remaining  bugs  

•  Remaining  ;ebreaking  rules  support  Improve  Pnyx  for  mobile  

•  Design  with  Bootstrap  •  Op;mized  ballots  for  mobile  

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   35  

Page 36: Pnyx: a powerful and user-friendly preference aggregation tool

Next steps? Theatrical topics

Improve  the  trus<ness  of  Pnyx  

•  Op;mize  the  data  base  •  Encrypt  ballots  and  results  

Other  topics  related  to  collec<ve  preferences  

•  Implement  matching…    

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   36  

Page 37: Pnyx: a powerful and user-friendly preference aggregation tool

Conclusion •  Developed  a  func;onal  app  from  

scratch  •  Learned  a  lot  about  web  development  •  Nice  tool  to  introduce  Social  Choice  

Theory  around  me  •  I  hope  Pnyx  will  have  a  dynamic  and  

bright  future  

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   37  

Page 38: Pnyx: a powerful and user-friendly preference aggregation tool

Thank you for your attention August  20,  2014   38  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]  

Page 39: Pnyx: a powerful and user-friendly preference aggregation tool

Cred

its •  Problem  Solving  designed  by  Rob  Maslin  from  the  Noun  Project  

•  Collect  designed  by  Icons8  from  the  Noun  Project  

•  Thinking  designed  by  Jens  Tärning  from  the  Noun  Project  

•  Server  designed  by  aLf  from  the  Noun  Project  

•  Internet  designed  by  Cindy  Hu  from  the  Noun  Project  

•  Floppy  Disk  designed  by  Cor  Tiemens  from  the  Noun  Project  

•  Administrator  designed  by  Dungeon  Hero  X  from  the  Noun  Project  

•  User  designed  by  Wilson  Joseph  from  the  Noun  Project  

•  Update  Profile  designed  by  gonzalo  garrido  from  the  Noun  Project  

•  Informa;on  designed  by  José  Campos  from  the  Noun  Project  

•  Database  designed  by  Shmidt  Sergey  from  the  Noun  Project  

•  Thief  designed  by  André  Renault  from  the  Noun  Project  

•  Fast  Forward  designed  by  aguycalledgary  from  the  Noun  Project  

•  Ques;on  designed  by  Mar;n  Delin  from  the  Noun  Project  

August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   39  

Page 40: Pnyx: a powerful and user-friendly preference aggregation tool

Why those choices? Python  

•  Programming  language  •  Support  web  &  scien;fic  programming  •  Implementa;on  of  all  the  applica;on  logic  

Django  •  Web  app  framework  in  python  •  Lots  of  built-­‐in  func;onali;es  •  Easy  to  grasp  

 August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   40  

Page 41: Pnyx: a powerful and user-friendly preference aggregation tool

Why those choices? (ctd) Bootstrap  

•  HTML  &  CSS  template  design  •  Nice  design  without    huge    •  Theme  from  bootswatch.com  

jQuery  •  Required  for  bootstrap  •  Standard  JavaScript  libraries  •  Nice  built-­‐in  features  for  UI  

 August  20,  2014  

Pnyx:  IDP  final  presena;on  -­‐  [email protected]   41