I seem to be constantly thinking about the algorithms that drive the pen, nib and ink (PNI) selection process in my fountain pen database. I had always considered the pen to be the starting point for the process. I wanted to challenge that assumption so I rewrote my algorithms to provide three PNI options - one with a pen as the starting point, one where a nib was the start and lastly where an ink was the start.
I randomly* select the Priority method to use on a particular day by interrogating the last digit of a millisecond timestamp taken during the startup script of the initial time I open the database each day.
Option 1 is Pen Priority
My current Pen option and the one randomly selected for today - M620 Piazza Navona with M600 14K fine nib, inked with Diamine Blue Black.
Option 2 is Nib Priority
The M101N 14K medium nib is driving this option - this nib is limited to M101N gold trim and M120 model pens.
A quirk with this method lies with the selection by nib above which requires a pen that is way down the list for rotation. Pelikan M120 Iconic Blue is currently number 32, so not due back another month. It should even itself out in time.
Option 3 is Ink Priority
In this case the Ink Priority and the Pen Priority are selecting the same combination of PNI. This due to both the pen and ink having the same rating for pen/ink use.
While I was at it I also challenged the assumption that the Days since last used (DSLU) value should be the main contributor to the score that pen, nib and ink starts with before I add modifiers to determine the next item into use.
I had previously created tables that record the duration of out of use between times in use of my pens, nibs and inks - this equates to a historic days since last used for each occasion.
I had analysed this data by recording the average and the median values for each. (A bit of maths definition here - average is the sum of the values of the items in the sample divided by the count of those items in the sample, median is the value of the middle item of the sample, calculated by sorting the values and then recording the value that is at the position of count/2). Difference between two values gives an indication of how skewed the sample is.
The real question was how many uses of history is appropriate for each type of item. A part of my normal stats for my database I record the median times used (TU) for each of pen, nib and ink so why not use this as the number uses of history to select. The current TU values are pens 14, nibs 12, and inks two. So I decide to bring into the history table the current DSLU score and include that with the number of historic figures to get an average and median score. I tested this new method and found that using the simple average or median score of all would make the current DSLU score meaningless. I played around with a few algorithms and finally decided that the current DSLU had to continue to play a direct role.
So the end result is that I have replaced the current DSLU with current DSLU plus two other possibilities depending on the individual DSLU vs median value of the entire category of item. So what is the median value of the entire category? Well its another stat that I track. Currently for pens it is 53 days, nibs 60 days and inks 378 days. So my current formula to determine the end result to sort of replace DSLU is thus.
If the items current DSLU is less than the median DSLU for that category the score it gets is the minimum of current DSLU, Average DSLU or Median DSLU, correspondingly if it is greater it is the maximum of current DSLU, Average DSLU or Median DSLU.
The result of this calculate seen in the below pen table as the field AD15 only makes up ¾ of the total (sCalc) the rest is made of a value that represents how it rates in usage in the last 12 months (DU12) and a value that represents how it rates in use with the seven pens in currently in rotation over its last seven times in use. Yes I like the number seven.
For nibs I run with the calculation as 100% of the total.
For inks I add three other values to the result of historical usage calculation, the first being a value that represents how it rates in usage in the last 60 months, secondly I have a rating relating usage by ink brand and third a rating that relates to usage by ink colour. These last two are attempt to balance usage between brands and colours.
All in all I am happy with this new direction of pen, nib and ink selection. Time will reveal if there are some biases in my algorithms that I have not foreseen.
*I truely do not know if the millisecond timestamp does give me a true random number.