View Single Post
Old 01-04-2017, 01:31 PM   #1
nasser
Evangelist
nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.
 
nasser's Avatar
 
Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
Popeye - A chess problem solving program - now ported to Kindle!

General:
Popeye solves chess problems - both orthodox and in fairy chess(using different rules for stipulations, pieces and conditions).

It's a CLI program, which accepts input from a text file or keyboard(the position to be solved) and after solving it, sends the results to the screen and/or a text file.

Porting History:
It was originally written in the early 1980s, in a Pascal dialect, and ran on MS-DOS. It was later re-written in C and ported to run on Unix, Windows, OS/2, VAX VMS, IBM MVS, SIEMENS BS2000, MacOS, and Linux.

Recently it was ported to Android and iOS by re-writing it in asm.js - a subset of JavaScript. This allowed it to run under any browser supporting JavaScript. (http://matplus.net/start.php?px=1483...&fid=it&page=0)

However, the port didn't work in the Kindle browsers. So I made a series of posts in another thread here (https://www.mobileread.com/forums/sh...4&postcount=22), intending to start an ARM specific native port which would work on the Kindle command line.

After seeing my posts, member encol kindly did a quick porting with his Kindle development setup(https://www.mobileread.com/forums/sh...8&postcount=30). Many thanks to him! I have re-attached the executable created by him to this post. Only renaming it from "py" to "popeye".

Instructions:
1. Your Kindle should be Jailbroken
2. kterm should be installed
3. Download the attached executable ("popeye")
4. Extract it to any suitable folder under /mnt/us
5. For running it, open kterm, navigate to the directory where it was extracted and type "./popeye"
6. Popeye now displays version and memory information and expects you to enter the position to be solved, using the protocol defined in the help file
7. Alternatively you can enter and save the position in a text file in the same folder as popeye. And then run it as "popeye xyz.txt", where"xyz.txt" is the file containing the position
8. After solving the position, popeye displays the solution on the screen. It can also be made to save the solution to a text file by specifying this in the input.

Help File:
The Popeye help file contains exhaustive instructions, covering all the possible options: https://github.com/thomas-maeder/pop...75/py-engl.txt

Other help sources:
More visual instructions may be found here:
http://juliasfairies.com/software/po...-and-examples/
http://juliasfairies.com/software/po...to-run-popeye/
http://juliasfairies.com/software/popeye/bscripts/
These are windows specific but can easily be adapted to a linux setting.

History:
An overview and a development history are here:
http://juliasfairies.com/software/popeye/
http://juliasfairies.com/software/po...ory-of-popeye/

Source code:
The source code can be seen here: https://github.com/thomas-maeder/popeye/releases/

Tried on:
Has been tested on PW1, PW3 and KT3. Should work on other models too.

EDIT (7-Jan-2017): KUAL extension added!
Instructions:
Extract the attached zip file "popeye_kual.zip" into /mnt/us/extensions
Create and save a position for solving in the specified format, as /mnt/us/extensions/popeye/files/inp.txt. You can use leafpad
Run KUAL. Popeye should now appear in the menu list
Run Popeye. Popeye takes the position in the file /mnt/us/extensions/popeye/files/inp.txt and solves it
It then displays the solution. After this, you can swipe to scroll up/down to see the complete output and then press any key to exit
In addition, the output is appended to the file /mnt/us/extensions/popeye/files/out.txt. You can browse through this to see the solutions of all the positions solved
The input file, obviously will get over written by the user, when he creates and saves a new position. For this, the input file is appended to /mnt/us/extensions/popeye/files/inp_bak.txt
Initially, there is a famous 3-mover by Sam Loyd saved in both the input and output files. You can run this first, if you like

Screenshot from KT3 added

EDIT (11-July-2017): New version v4.77!

Instructions: Extract from attached zip(popeye_v477.zip) and replace earlier version

Changes from previous version:
Spoiler:
New features: Fairy condition Lost Pieces

Bug fixes:
  • ChineseChess: pawn promotion to chinese piece types absent from board was not possible
  • TransmutingKings didn't properly transmute to Queen because of an "optimisation"
  • NorskChess: castling must turn the rook into a bishop
  • Intelligent mode: option nocastling was mis-interpreted
  • twinnings by substitution weren't correctly taken back; subsequent twins were therefore handled incorrectly
  • "funny" solving behaviour in "battle play" problems with pawn promotions as defences
  • indication of the position: capital letters were not accepted as file indication (e.g. KA2)

Other fixes
  • clarified misunderstandings regarding Maximummer and BlackMaximummer in the docs and by producing an additional error message
  • help the user find erroneous piece indications (e.g. Xb1) with an added error message
Attached Thumbnails
Click image for larger version

Name:	screenshot_kt3.png
Views:	960
Size:	13.4 KB
ID:	154004  
Attached Files
File Type: zip popeye.zip (284.0 KB, 312 views)
File Type: zip popeye_kual.zip (286.7 KB, 354 views)
File Type: zip popeye_v477.zip (279.8 KB, 315 views)

Last edited by nasser; 07-11-2017 at 05:17 AM. Reason: New version
nasser is offline   Reply With Quote