www.justiceforchandra.com Forum Index www.justiceforchandra.com
Justice for Chandra Levy and missing women
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Developing Double Deck Pinochle

 
Post new topic   Reply to topic    www.justiceforchandra.com Forum Index -> www.rdwrites.com forum (part of www.justiceforchandra.com)
View previous topic :: View next topic  
Author Message
rd



Joined: 13 Sep 2002
Posts: 9237
Location: Jacksonville, FL

PostPosted: Mon Aug 16, 2010 10:05 pm    Post subject: Developing Double Deck Pinochle Reply with quote

I've started my next software project, my Double Deck Pinochle for the web. I'm going to blog a little about it as I go along to share my thoughts on developing Double Deck Pinochle, both going forward and some memories from the past.

Double Deck Pinochle was my first project after I bought a TRS-80 in 1981 as a returning college student in the midst of a severe recession, the severest I had known until the Great Recession of the 2000's.

I was determined to master programming with my TRS-80 and finally just quit going to class to stay home and program. Two years later I had a Double Deck Pinochle program in Z-80 assembler and a divorce. Can't say I blame her, to be sure.

Still, trotting around my Z-80 assembler listings in Atlanta finally got me some gigs. It's not the route I suggest, trust me. But hard core hackers know that that's the way they will do it, regardless.

So from Z-80 I tweaked for CP/M on a KayPro luggable I was able to swing a financed deal on. What a sweet machine that was. Someone bought a CP/M version of Double Deck Pinochle from my distributor so of course it was worth it. Not to mention demoing Pinochle on that little 4 or 5 inch screen. The only thing different between that and a PDA now is about 50 pounds.

Then a rewrite for 8086 under DOS. That I got into a freeware distribution at some point shortly afterward and I've seen it listed through the years in various places. Double Deck Pinochle by Ralph Daugherty (c) 1983.

I have made my original instructions from 1983 (slightly updated) available to view. The instructions are still good to go.

http://www.rdwrites.com/rd/pcpin.txt

Never did get around to putting out a Delphi version for Windows, although I started it once. Then Borland came out with Kylix for Linux / Windows cross platform development and I said sweet, I'll do that. I still have Kylix in the original box, never even got around to installing it.

But I did get around to rewriting Pinochle in Java. A pretty elegant OO design rewrite, in my opinion. Tested it with a rudimentary DOS like AWT panel, but I wrote it interface independent among other things.

So to put it on the web with a JSP server would be a piece of cake, wouldn't it? And I could run it on any or all of my large Windows, Linux, and AS/400 iseries servers. But that's not what I'm interested in.

After almost a decade of making a living as an 8086 DOS programmer, I've made my living the past two decades as an AS/400 RPG programmer. And my personal interest is demoing the AS/400 now known as iseries and other iterations of i based on how much caffeine IBM marketing people in New York have had on any given morning as a high speed server, on the web with RPG CGI.

I can compile in any combo of RPG, Java, and C++ as needed, but I will be going vanilla RPG. To see what RPG looks like now, you can take a look at my open source RPG projects on Google code. (see
WEBVISITOR demo 5250 subfile program in ILE RPG /free)

I won't be releasing Double Deck Pinochle open source but I will follow up with an open source RPG CGI demo engine based on it on my rdwrites Google code project.

I'll blog my thoughts as I go along, anything from current rewrite of Java to RPG, or comments on getting it into Java from 8086, or heck, memories of prototyping it in interpreter BASIC on the TRS-80 and rewriting in Z-80 assembler. (I know it's supposed to be assembly but I never liked that term.)

I may occasionally throw in a comment on Artificial Intelligence as pertains to a computer game playing program as may strike me in my reading. I'm currently reading Nils Nilsson's The Quest for Artificial Intelligence, with a fairly extensive and complete set of works lined up afterward. In addition to Double Deck Pinochle, I've written a complex OCR analysis engine which I will pick up on at some point later. (see rdwrites OCRvectors image)

Both types of software are considered "AI" by many but my definition of AI tends to be more of a Turing test.

In any event, lots of software to write and hopefully comments just as interesting to accompany.

rd

click to read the online true crime mystery novel Murder on a Horse Trail: The Disappearance of Chandra Levy

www.justiceforchandra.com home page
_________________
ralph@ee.net
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rd



Joined: 13 Sep 2002
Posts: 9237
Location: Jacksonville, FL

PostPosted: Wed Aug 18, 2010 9:20 pm    Post subject: Reply with quote

Along the lines of intelligence, there is discussion on a fungus that is said to control an ant to climb a plant and stay there so the fungus can spore effectively.

We know that:

- organisms that survived and procreated did something successful, and

- behavior is inherited.

This sounds to me like the ant climbs because the fungus is in its head and its trying to escape it by going higher. There's a similar organism reproduction cycle with ants where the ant goes to the top of grass, and the ant is said to be controlled to do that so it is easy prey for a bird where the organism continues the cycle in the intestines.

The way this should be viewed is that parasites that attacked certain areas of their host that resulted in host behavior that was most successful for the parasite to move to the next stage of growth survived, and others who didn't are not here. Neither "controlled" the host, it is blind evolutionary luck.

Similar can be said about organisms that release toxins that force a flushing action for their onward journey. Did they "control" the host to develop diarrhea? No, those that perform actions that allow for survival and procreation survived and procreated. Unfortunately for both ants and humans, with devastating, but thoughtless, effectiveness.

rd
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rd



Joined: 13 Sep 2002
Posts: 9237
Location: Jacksonville, FL

PostPosted: Fri Aug 03, 2012 8:57 pm    Post subject: Reply with quote

re: 35th anniversary of TRS-80:

Cassette tapes unreliable storage? That's one of the kinder ways to describe it. :) But seriously, I taught myself programming with the Z-80 assembler/debugger and would make multiple backups to tape to counter the occasional read glitch that rendered the tape contents lost for all practical purposes. (Although in a pinch attempting to read it in over and over with fingers crossed hoping that one time it would work was occasionally successful, at which point you wrote it out to a new backup tape.)

Wrote Double Deck Pinochle as my first program, later rewrote for DOS (is freeware out there somewhere), rewrote it in Java a few years ago (seriously proper OO architecture, but an interesting experience to rewrite 8086 to Java), and just so happens am now rewriting from Java to RPG for my IBM i (iseries AS/400) web server. Again an interesting experience. :)

For those who might wander about RPG looks like these days, I have open sourced a couple of projects:

http://code.google.com/p/rdwrites/downloads/list

(the ascii source downloads can be viewed in a text editor.)

And I have the TRS-80 to thank for it all. So happy 35th, TRS-80.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rd



Joined: 13 Sep 2002
Posts: 9237
Location: Jacksonville, FL

PostPosted: Wed Feb 18, 2015 9:40 pm    Post subject: Reply with quote

Re: a discussion elsewhere about OO using Employee and Product as classes (and someone suggests they are the same thing if implemented as Row classes with foreign keys to each other) -

For a consulting company, the employee is the product, but other than that, these classes are supposed to hold all methods pertaining to the subject, and business logic for Employees is different than business logic for a Product the Employees make.

I really don't see that the theory of OO classes scales well, as in these examples. But obviously billions of dollars are spent to try to make it work.

At a smaller scale, I wrote a Double Deck Pinochle game as my first program back in 1981 on my first computer, a TRS-80. That was Z-80 assembler, then I rewrote in 8086 for PC DOS, and here's where it gets interesting, I rewrote in Java to teach myself Java, then rewrote in RPG for web serving. An interesting journey.

Just as example of what I found scope of classes that work, the classes in my Java version of Double Deck Pinochle are:
Pcpin
Pcpinheader
Execpcpin
PcpinPane
IntStack
Util
IPinochle
Deal
Rndmcard
PIdeck
Bidder
Player
Play

There are four instances of the Player objects.

They ended up being data structures in RPG. The RPG will do the web serving. The Java is retired. It works but didn't buy me anything over RPG.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rd



Joined: 13 Sep 2002
Posts: 9237
Location: Jacksonville, FL

PostPosted: Thu Feb 19, 2015 9:18 pm    Post subject: Reply with quote

"Where do you see the issue with OO scaling?"

I gave examples of the class organization I used for my Double Deck Pinochle program. There are several of them, in this design there was no inheritance. For example, I didn't have some low level abstraction of a card player who at one point is a Bidder and at another point a Player, so that approach would have Bidder and Player classes inherited from a base card player class. I would have done that had there been some common behavior to share with both but there wasn't.

Now contrast that to the typical examples given in OO discussions, some base level class such as Employee from which all employees will be inherited. There may be some common behavior among all Employees, interaction with HR comes to mind, but it"s like inventing humankind from Adam with layer upon layer of attempts at isolating common behaviors at increasingly specialized subclasses, with oh so many exceptions and gotchas as one can imagine. This is what I mean by OO theory not scaling well.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rd



Joined: 13 Sep 2002
Posts: 9237
Location: Jacksonville, FL

PostPosted: Thu Feb 19, 2015 11:50 pm    Post subject: Reply with quote

"HR will be in an HR class"

You are thinking of HR functionality which indeed is in an HR oriented class. I am speaking of common Employee interactions with HR, such as setting / changing personal information. Methods to do that could be considered common to all employees of a company versus having those methods in every class that handles various jobs within the company.

Now mind you, all I was doing was tossing what possibly could go in an Employee class as common to all Employees (along with Product, presumably of a company). Anything that is not common to all must go in more specialized subclasses inherited from Employee.

I thought it was stupid then, and finding out now a gazillion Java programmers finally figured that out too, lord knows how many billions spent with them architecting up elaborate schemes based on those premises. So now there are service layers. But it's still object oriented. Yeah, whatever.

The bottom line is I haven't seen any of the success stories that were to come from an OO world. And trust me, promises of OO nirvana is all I heard for decades.

RPG is still the most cost effective way to develop and execute business systems. And in my own little world I ran Java and RPG head to head for web server backend logic for Double Deck Pinochle. Not a business system, but a non-trivial head to head.

RPG will be doing the web serving. Hands down winner.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rd



Joined: 13 Sep 2002
Posts: 9237
Location: Jacksonville, FL

PostPosted: Mon Jun 22, 2015 4:43 pm    Post subject: Reply with quote

Getting close to Double Deck Pinochle being ready. I have made my original instructions from 1983 (slightly updated) available to view. The instructions are still good to go.

http://www.justiceforchandra.com/rd/pcpin.txt
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rd



Joined: 13 Sep 2002
Posts: 9237
Location: Jacksonville, FL

PostPosted: Sat Jun 27, 2015 1:02 pm    Post subject: Reply with quote

I got this first screen demo working last night. I won't have it on DNS till ready but you can take a peek to see the screen. It loops on login screen, doesn't do anything.

http://173.8.38.42/IBMi/login

I'm creating a Double Deck Pinochle forum for any discussion on this Double Deck Pinochle Rating app.

More to come as I get the screens working.

rd
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rd



Joined: 13 Sep 2002
Posts: 9237
Location: Jacksonville, FL

PostPosted: Sat Jun 11, 2016 8:32 am    Post subject: Reply with quote

responding to a comment elsehwere about unrealistic hands on online sites:

When I first prototyped Double Deck Pinochle with interpreter BASIC on the TRS-80, like most card game programmers I expect I dealt using the Random function of the language. I quickly came to see that the hands just weren't realistic. Yes, a programmer could tweak with seeding to try to get different results but the process just didn't result in the feel of shuffled and hand dealt cards to me. And hands were everything.

Due to the incredibly small amount of memory being worked with in the beginning, the program needed to fit in 16k memory so that left out large amounts of data to use in building hands. Experimenting it turned out that the Z-80 object code of the program turned out to be a good source of data to use in building Double Deck Pinochle Hands.

Was not the case with 8086 object code when I converted for PC. But I had room for data. So I fashioned some data and an algorithm for picking from it and arrived at realistic hands again. Of course you have to play with real shuffled cards to have a sense of what realistic is, and that's the only thing I knew.

Realistic hands are critical to the enjoyment of the game as I'm sure we would all agree.

What I saw with random function back in the day was unusually common long suits and some other stuff that didn't smell right.

But it doesn't affect us like with poker. The combination of 1) money, 2) random number generators generating same sequence from a starting point, and 3) cards issued during play in which predicting 2) leads to 1) makes it an entirely different ballgame.

I can't stand the concept of issuing the same sequence of numbers from a starting point even if there is a lot of starting points, and so between that and the unrealistic hands I've seen generated I just do my own thing. It's in my DOS game so if there were unrealistic hands in my dealing it would show there.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rd



Joined: 13 Sep 2002
Posts: 9237
Location: Jacksonville, FL

PostPosted: Mon Jun 13, 2016 8:10 pm    Post subject: Reply with quote

responding to someone remembering an IMSI 8080 used in War Games:

well, speaking of remembering, I finished last year rewriting my Double Deck Pinochle program in RPG. Originally written in Z-80 for the TRS-80, rewritten in 8086 for the PC, rewrote in Java (all single user versions of the game), and now rewrote for multiple users in RPG for web game server.

Basically went from arrays of objects in the Java single game version to multi-dimensioned data structures in RPG for the multiple game web version. The RPG coding is very powerful.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.justiceforchandra.com Forum Index -> www.rdwrites.com forum (part of www.justiceforchandra.com) All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group