polls icon indicating copy to clipboard operation
polls copied to clipboard

poll variant : Condorcet method support

Open artlog opened this issue 10 months ago • 17 comments

⚠️ This issue respects the following points: ⚠️

Describe the goal you'd like to achieve

Support condorcet method in poll.

This method will require to set priorities or an ordering between poll entries. Possibility to prioritize responses could be reused for other voting variant ( by example #3472 ). This feature is part of voting variant and some requests exists already over this topic.

Describe possible solutions

I will start the study of this feature as mandated by my client.

Additional context

Astrolabe cooperative considers founding this request to get it done.

artlog avatar Mar 07 '25 09:03 artlog

Hello, i was looking as well to get a feature like this one to be implement. I will look at it, i've found than php as already an library https://www.condorcet.io who can help. The easiest maybe it's have an option ranking in the text type poll configuration tab who let people insert text instead of checkbox.

vinimoz avatar Mar 13 '25 19:03 vinimoz

Hello Guys, i've implement the rank base poll with text only for the moment. I will do more test before to commit it. After, this implemented, i can try to work on condorcet with different vote result possibility. I saw u are working to migrate to vue3.... Hope it will not interfer too much. I've do my test with polls 7.4.1 Image

vinimoz avatar Mar 19 '25 02:03 vinimoz

@vinimoz Nice. But please take into account, that the main branch is changing a lot.

The master-7 branch is the current branch for v7.x and will die once v8 is stable.

Would be happy to see your implementation and further discussion in your upcoming PR. If you need help, don't care to contact me. Let's see, how we can adopt it then for the main branch.

dartcafe avatar Mar 21 '25 23:03 dartcafe

@dartcafe it's almost finished. If u want i can post it. like that maybe u will be happy :) Some improvement maybe will be to adapt correctly box size for display type of vote like star vote, etc. I can do more testing later. To avoid branch 8 disturbing.

On 21/03/2025 13:08, René Gieling wrote:

@vinimoz https://github.com/vinimoz Nice. But please take into account, that the |main| branch is changing a lot.

The |master-7| branch is the current branch for v7.x and will die once v8 is stable.

Would be happy to see your implementation and further discussion in your upcoming PR. If you need help, don't care to contact me. Let's see, how we can adopt it then for the |main| branch.

— Reply to this email directly, view it on GitHub https://github.com/nextcloud/polls/issues/3897#issuecomment-2744653871, or unsubscribe https://github.com/notifications/unsubscribe-auth/AW7C5TTTUWKWNX3FIVQARNT2VSLYLAVCNFSM6AAAAABYQYH542VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONBUGY2TGOBXGE. You are receiving this because you were mentioned.Message ID: @.***>

dartcafedartcafe left a comment (nextcloud/polls#3897) https://github.com/nextcloud/polls/issues/3897#issuecomment-2744653871

@vinimoz https://github.com/vinimoz Nice. But please take into account, that the |main| branch is changing a lot.

The |master-7| branch is the current branch for v7.x and will die once v8 is stable.

Would be happy to see your implementation and further discussion in your upcoming PR. If you need help, don't care to contact me. Let's see, how we can adopt it then for the |main| branch.

— Reply to this email directly, view it on GitHub https://github.com/nextcloud/polls/issues/3897#issuecomment-2744653871, or unsubscribe https://github.com/notifications/unsubscribe-auth/AW7C5TTTUWKWNX3FIVQARNT2VSLYLAVCNFSM6AAAAABYQYH542VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONBUGY2TGOBXGE. You are receiving this because you were mentioned.Message ID: @.***>

vinimoz avatar Mar 23 '25 06:03 vinimoz

after branch 8 is released what could be done :

  • Handled display, star vote ( *, **, ***, ) or appreciation vote ( bad, good, better )
  • Handle date rake poll vote.
  • Condorcet method could be apply as we can handle it with rank vote and the php library.

vinimoz avatar Mar 23 '25 07:03 vinimoz

Since you are basing on 7.4.1, you can open a PR against the master-7 branch. I will then review it.

A PR does no harm.

dartcafe avatar Mar 23 '25 07:03 dartcafe

PR has been proceed, i've never done it hope it work. Let me know if u get it

vinimoz avatar Mar 23 '25 23:03 vinimoz

Where? Not here...

Create a PR from your branch and point it to https://github.com/nextcloud/polls/tree/master-7

Image

dartcafe avatar Mar 24 '25 16:03 dartcafe

I think i've tried but i wasn't allowed, its look like i need to be a poll developer. So i do a fork, i put the modification on the fork i've created https://github.com/vinimoz/polls

vinimoz avatar Mar 24 '25 17:03 vinimoz

I added a PR from your branch #3930

Find comments in the review comments there.

dartcafe avatar Mar 24 '25 17:03 dartcafe

I think i've tried but i wasn't allowed, its look like i need to be a poll developer. So i do a fork, i put the modification on the fork i've created https://github.com/vinimoz/polls

Strange. Until now there were a lot of PRs from foreign branches.

I am confused too. I cannot add myself as a reviewer or assign you to the PR. Maybe you can change it.

dartcafe avatar Mar 24 '25 17:03 dartcafe

@vinimoz I took a look to your Rank_votes_feature branch i will use it as a poc in #3472 so my comments will go there. ( and a big thanks for your work ).

artlog avatar Jul 02 '25 12:07 artlog

@dartcafe , FYI i tried to merge Rank_votes_feature in enh/prepare-voting-variants but this was too complex for me, mainly due to vuejs3 . I won't do it again soon, sorry.

artlog avatar Jul 02 '25 12:07 artlog

That is what I expected. v7 will run out of maintenance soon and the changes to v8 are nearly a complete rewrite code-wise.

But 8.x already knows a voting variant, which is meant to decide using other voting types than yes/no.

Thinking about it: What is missing is an evaluation variant, which should allow to evaluate the result based on different rules.

dartcafe avatar Jul 10 '25 07:07 dartcafe

@dartcafe It of course depends on what semantic we attach to 'variant' term. ( this discussion might be moved somehwere else )

We certainly will have to separate the poll type from the voting evaluation just like separating frontend and backend,

For condorcet ( or majority judgment ) this is a new type of poll that is neither support by text poll with the four options 'yes','no','maybe',empty and this is not a date poll either.

How do variants differs from poll types ? I now wonder if a poll variant is a combination of poll type and evaluation or just a sub type of a poll type ?

In condorcet case : For each vote each option should be fully ordered among answers: Once such variant which is somehow ''ordered poll' exists then condorcet method is one of possible evaluation variant. To some extent majority judgement could reuse ordered poll as another evaluation method, but by forcing full ordering of options we lose a great interest of it.

In majority judgment each vote requires to have an answer but that can be shared among options. This kind of pool has been implemented by @vinimoz as a generic poll type. To use it with condorcet evalution requires an additional check to refuses answers used twice. but that does not requires to change the gui. To use is with majority evaluation does not requires adaptations.

Condorcet and majority judgement don't have same contraints, using a generic gui would of course be less intuitive than having a dedicated one. For condorcet just being able to order options would be great and for majority judgment drag and dropping options in possible answer list would be great to. At the moment current proposal from @vinimoz just allow to support both at the expense of being generic.

In fact the generic method should be the base of 'text' poll, text poll that is choice for an option in 4 hardcoded possible answers while generic is choice for an option in a configurable list of answers.

Computation of poll result is currently done on the fly at each vote, how to handle this in other evaluation method can lead to other questions. Should compution be done at each vote, or waiting poll to be completed ? There are so many questions there.

Having a normalized API for voting evaluation would of course be great. Here question of a normalized voting model including respect of privacy is a wider subject.

artlog avatar Aug 02 '25 09:08 artlog

My understanding:

  • poll type - What kind of options are proposed:

    • date
    • text
    • pictures
    • ...
  • voting variant - How participants can vote:

    • yes|no|maybe|null
    • points
    • stars
    • ordered
  • result variant (currently missing) - How is the winner determined:

    • counting points
    • most points
    • Condorcet method
    • most yes
    • ...

For condorcet just being able to order options would be great and for majority judgment drag and dropping options in possible answer list would be great to.

That's what I have in mind and depends on the voting variant. Of course, the result variant may have constraints, which voting variant and possibly which poll type can be used.

dartcafe avatar Aug 02 '25 09:08 dartcafe

@dartcafe thanks, this is very clear. current implementation by @vinimoz is then a configurable list voting variant. i will take a look how to adapt it to this model.

artlog avatar Aug 02 '25 11:08 artlog