04-06-2020, 08:45 PM
(N.B. : in the good forum ! thanks, SlideRule)
Leapfrog way
(or how to drive 2 groups of 3 sheep, face to face on a very narrow steep mountain trail !)
The original program had been written for HP67, HP41C and TI59, and came on year 1980 !
It was published by Jean-Jacques Dhenin in the magazine "Jeux et Stratégie" #1, under the title "Jouez à saute-mouton".
So, I have borrowed the idea from this fantastic publication.
However, I propose here a version of mine for the HP12C, without index register and other indirect memories.
This game is rather a problem to solve or a puzzle to complete.
2 groups of 3 sheep (frogs in English) are face to face.
There is no way for a group to go back or to cross the other group or to pass next to each other without to leapfrog.
Their only solution is to jump over the animals in front of them, again and again, until they pass the whole group.
The starting position follows from this presentation :
_→ → →_← ← ←_ on the way
_5 5 5 _ 2 2 2_ in the program
#1 2 3 4 5 6 7 list of the places
These are the rules :
- an animal do not leapfrog a animal of its own group
- an animal of a group may jump over the animal immediately in front of him, and from the other group, only if it has free space just behind
- an animal is not authorized to go back or to reverse
The puzzle is completed if all the animals of the 2 groups have free way to progress forward :
_← ← ←_→ → →_ on the way
_2 2 2 _ 5 5 5_ in the program
Use of the program :
. store 10 in PMT
. store 0,5550222 in PV
. store 0,2220555 in FV
. g GTO 00 and R/S
. the display is 0,55502220 and waits a move from 1 to 7
--> at first you can just input 3 or 5 as correct move and press R/S
. I choose 3 R/S and the HP12C returns 1,55052220 after this 1st step
--> at this time there is 2 correct moves : 2 (moving 5 before 0 on display) or 5 (moving 2 just in front of 5 by leapfrog)
. and so on with 2,50552220 or 2,5525022 on display !
Warning about input boundaries :
. the program aborts a non authorized move by displaying without changes the last position known
. but the program does not verify if a 5 species is about to come on place # 8, or if a 2 species arrives on place # 0...
Leapfrog way
(or how to drive 2 groups of 3 sheep, face to face on a very narrow steep mountain trail !)
The original program had been written for HP67, HP41C and TI59, and came on year 1980 !
It was published by Jean-Jacques Dhenin in the magazine "Jeux et Stratégie" #1, under the title "Jouez à saute-mouton".
So, I have borrowed the idea from this fantastic publication.
However, I propose here a version of mine for the HP12C, without index register and other indirect memories.
This game is rather a problem to solve or a puzzle to complete.
2 groups of 3 sheep (frogs in English) are face to face.
There is no way for a group to go back or to cross the other group or to pass next to each other without to leapfrog.
Their only solution is to jump over the animals in front of them, again and again, until they pass the whole group.
The starting position follows from this presentation :
_→ → →_← ← ←_ on the way
_5 5 5 _ 2 2 2_ in the program
#1 2 3 4 5 6 7 list of the places
These are the rules :
- an animal do not leapfrog a animal of its own group
- an animal of a group may jump over the animal immediately in front of him, and from the other group, only if it has free space just behind
- an animal is not authorized to go back or to reverse
The puzzle is completed if all the animals of the 2 groups have free way to progress forward :
_← ← ←_→ → →_ on the way
_2 2 2 _ 5 5 5_ in the program
Use of the program :
. store 10 in PMT
. store 0,5550222 in PV
. store 0,2220555 in FV
. g GTO 00 and R/S
. the display is 0,55502220 and waits a move from 1 to 7
--> at first you can just input 3 or 5 as correct move and press R/S
. I choose 3 R/S and the HP12C returns 1,55052220 after this 1st step
--> at this time there is 2 correct moves : 2 (moving 5 before 0 on display) or 5 (moving 2 just in front of 5 by leapfrog)
. and so on with 2,50552220 or 2,5525022 on display !
Warning about input boundaries :
. the program aborts a non authorized move by displaying without changes the last position known
. but the program does not verify if a 5 species is about to come on place # 8, or if a 2 species arrives on place # 0...