D18566: Support for solving Golf using bh-solver.

Shlomi Fish noreply at phabricator.kde.org
Tue Feb 5 13:08:37 GMT 2019


shlomif added a comment.


  Better formatted table:
  
    Old                 New                 Count
    ---                 ---                 -----
    lost                lost                2291
    lost                unknown             462
    lost                won                 930
    unknown             lost                9
    unknown             unknown             56
    unknown             won                 38
    won                 unknown             13
    won                 won                 1201
  
  and the new script:
  
    #! /bin/bash
    #
    # analyze.bash
    # Copyright (C) 2019 Shlomi Fish <shlomif at cpan.org>
    #
    # Distributed under terms of the MIT license.
    #
    
    
    filt2()
    {
        grep -E '^[1-9]' | head -5000
    }
    filt()
    {
        filt2 | perl -lanE 'say $F[1]'
    }
    head_()
    {
        echo $'Old\tNew\tCount'
    }
    (
    head_
    head_ | perl -lpE 's/\w/-/g'
    paste <(< old-golfs.txt filt) <(< new-golfs.txt filt) | sort | uniq -c | perl -lanE 'say "$F[1]\t$F[2]\t$F[0]"'
    ) | perl -lanE 'printf"%-20s%-20s%s\n", at F'

REPOSITORY
  R410 KPatience

REVISION DETAIL
  https://phabricator.kde.org/D18566

To: shlomif, #kde_games
Cc: aacid, kde-games-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20190205/ece4c194/attachment.html>


More information about the kde-games-devel mailing list