Pinochle: Configuration

Your JoeDog’s Pinochle is configured with a properties file inside your home directory. When the game launches, it looks for $HOME/.pinochle. If it doesn’t exist, the program creates that directory. Inside that directory, it installs two files: 1.) game.conf and 2.) memory.txt

The first file contains the configuration. You can edit that file directly or you can use the graphical interface. Navigate to Preferences => Configure…  to open that window. You can also get there with the ctrl-c keyboard shortcut.

Inside the Configuration window, one thing is apparent: some items are grayed out. These are place-holders for configuration options we plan to implement. In the meantime, you’ll certainly want to configure the names. I generally pair my wife and I against our dogs. Sometimes the dogs win and that makes me both angry and proud. I’m angry because I lost to a stupid computer. I’m proud because I wrote it.

There are several undocumented configuration settings which I’ll document here. But wait a minute! If they’re documented here,  then are they really undocumented? Good point, Smarty Pants. Here are the available settings:

#Fri Jan 03 14:58:37 EST 2014



Winning Score

The default is 300. This is the score to which you’ll play. In this case, the winner is the first team that reaches 300. If both teams cross 300 in the same hand, the winner is the team that took the bid. (Bidder goes out). It doesn’t matter if bidders score fewer points than their opponents. If they win the bid and cross the threshold, they win the game. Exciting! The winning score can be configured through the interface.


Minimum Bid

The default value is 16. This represents the minimum opening bid. In order to enter the auction, you must bid at least this many points. JoeDog’s Pinochle rotates the deal between all players. Bidding begins with the player left of the dealer. If all players pass, then the dealer is stuck with it. When that happens, his bid is automatically 16. The minimum bid can be configured through the interface.



Where [Direction] North, South, East and West. Those are also the default values for each player at the table. The first letter in each name will displayed in the score tablet. By default it looks like:  N/S  |   E/W   Unless you have a strong identification with your geographic proximity, you’ll probably want to change these. You can set these values in the interface.



Where [Direction] is North, South, East and West. These are numbers which tell the game what type of player it should configure. In the file 0 [zero] is a Human player and 1 [one] is a Computer player. At some point we’d like to add different types of players. They may be artificial intelligence types or playing styles. These values can be set in the interface. They’ll appear in the GUI and “Human” and “Computer.”



This tells pinochle to go into cheat mode. What’s that mean? Basically it turns everybody’s cards face up. This mostly exists as a programmer’s helper so we can be assured that the computer is doing what we expect it to do. I’m not going to tell you the cheat but it’s the same phrase as a very popular simulation computer game from the 80s and 90s. (If you want the cheat, just email me and I’ll send it to you. If you figure it out, please email me and tell me about it) This feature can only be set inside the file



The values are true or false.  The default is false. This puts the game into debugging mode. Basically, it prints things to standard out. (Windows users will have to launch the game from the command line to enjoy this feature. Mostly these are programming helpers to let us know which block of code the game is executing but we tried to make them light-hearted, “Pommie is gonna run you fsckers out of trump!”  Non-programmers may game some insight as to how the game works. This feature can only be set inside the file.



The values are true or false. The default is false. When headless is enabled (true), the game runs without a graphical interface. I use this feature to “teach” the game how to bid. I crank up the WinningScore to 3 gabazillion and let the game play itself over and over. It stores those outcomes in the memory.txt file I told you about. When Computer players bid, they consult their experience to help them shape formulate their maximum bid. Since I switched to this model, the game has become a much more competitive. This value can only be set inside the file


MainX and MainY

The default values are 0 and 0 (zero|zero). These are the coordinates for the main card table. Whenever you move the card table, JoeDog’s Pinochle will remember its coordinates. If you move the main window to the lower portion of your screen, it will be there then next time you launch a new game. Hey, we aim to please. These values can be set simply by moving the main card table.


ConfigX and ConfigX

The default values are 0 and 0. These are the coordinates for the Configuration window (Preferences => Configuration…) JoeDog’s Pinochle saves the position of the window so it will open in the same place every time. These values can be set simply by moving the window and closing it in that position.


DialogX and DialogY

The default values are 0 and 0. Like all other windows, JoeDog’s Pinochle remembers the coordinates of your dialog windows. Each time it opens a dialog, it will place it in the position at which it was last closed. You can configure these values simply by moving the dialog window.




This file stores the game’s playing experience.  To create this file, we had the game play itself over 100,000 times. It stored the results of those games inside this file. When you get a new version of Pinochle, you’ll probably get a new memory.txt. It’s important to generate one based on the latest algorithms in the game. It can take days to generate a new one. If this file is missing, the game will generate a new one. The contents of the file look like this:


The first two blocks represent clubs and hearts. That can be consulted interchangeably. If a club hand looks like a good hearts hand, well then it’s a good club hand. Because pinochle in general and double pinochle in particular can really skew the results of a hand, we had to treat those suits as is. While we can compare clubs and hearts interchangeably as described above, diamonds and spades must be consulted as is.  The number represents the points earned by that hand.


Posted in | Leave a comment

Leave a Reply

Recent Comments

  • Jeff Fulmer: The hit counts will vary since you’re doing time-based testing. Instead of -t10s try -r10 siege...
  • Oleg: Strange results. For example i do siege -t 10s -v -c 10 and count of hits always...
  • Jeff Fulmer: Bette – I’ve heard of that variation but I don’t think it’s widely accepted. As...
  • Bette: I really like your site. There are so many people playing in different ways. I can play in most ways, however...
  • Sebastiaan Giebels: This just opens the way for MITM attacks. Anyone between your client and the server you are...