prologgenetic-algorithmexecutionevolutionary-algorithmrosetta-code

Execute Prolog program with output apart from true/false


I am trying to execute the example code from RosettaCode's take on writing an evolutionary algorithm in Prolog (see here).

Can anybody tell me how to generate the same output as displayed below the code example?


Solution

  • The problem is the interpretation of quotation marks in newer SWI Prolog versions (> 7.x).

    Two solutions:

    1. Start Prolog with swipl --traditional
    2. Replace all quotation marks in the code with backquotes (`)

    Thank you Thomas By for your help!