logoalt Hacker News

athrowaway3ztoday at 1:05 PM0 repliesview on HN

Something like this sketch work for you?

peer(X, 0) :- founding_peer(X).

electorate(T, count<Y>) :- peer(Y, T).

support(X, T, count<Y>) :- candidate(X), peer(Y, T), recognizes(Y, X, T+1).

peer(X, T+1) :- support(X, T, Votes), electorate(T, Total), 2 * Votes > Total.