Implementing Matrix Multiplication Algorithms Discovered By DeepMind’s AlphaTensor

Last week there was a lot of excitement when DeepMind’s AlphaTensor discovered some new algorithms for doing matrix multiplication. Implementing these algorithms in Python should have been a trivial task but I could not find any source code. After a great deal of effort I was able to write some code to demonstrate at least one of the new algorithms.

If you download the PDF from the Nature article you will find the algorithm for multiplying 4 × 4 matrices in modular arithmetic (Z2) with 47 multiplications on page 12 and the algorithm for multiplying 4 × 5 by 5 × 5 matrices in standard arithmetic with 76 multiplications on page 13.

I was unable to implement the algorithm for multiplying 4×4 matrices because they used modular arithmetic. Now there is nothing complicated about modular arithmetic but I just could not figure out how it applied to the equations they provided. Fortunately the other algorithm used standard arithmetic so there was nothing difficult about that. It was tedious to copy their equations because they provided them in an image file. I had to use OCR to convert the image of the equations to text. Since there are 76 multiplications for the 4 × 5 by 5 × 5 matrices it was a lot of work.

The 76 multiplications are:

H1 = a3,2 * (-b2,1 - b2,5 - b3,1)
H2 = (a2,2 + a2,5 - a3,5) * (-b2,5 - b5,1)
H3 = (-a3,1 - a4,1 + a4,2) * (-b1,1 + b2,5)
H4 = (a1,2 + a1,4 + a3,4) * (-b2,5 - b4,1)
H5 = (a1,5 + a2,2 + a2,5) * (-b2,4 + b5,1)
H6 = (-a2,2 - a2,5 - a4,5) * (b2,3 + b5,1)
H7 = (-a1,1 + a4,1 - a4,2) * (b1,1 + b2,4) 
H8 = (a3,2 - a3,3 - a4,3) * (-b2,3 + b3,1)
H9 = (-a1,2 - a1,4 + a4,4) * (b2,3 + b4,1)
H10 = (a2,2 + a2,5) * b5,1 
H11 = (-a2,1 - a4,1 + a4,2) * (-b1,1 + b2,2)
H12 = (a4,1 - a4,2) * b1,1 
H13 = (a1,2 + a1,4 + a2,4) * (b2,2 + b4,1)
H14 = (a1,3 - a3,2 + a3,3) * (b2,4 + b3,1) 
H15 = (-a1,2 - a1,4) * b4,1 
H16 = (-a3,2 + a3,3) * b3,1
H17 = (a1,2 + a1,4 - a2,1 + a2,2 - a2,3 + a2,4 - a3,2 + a3,3 - a4,1 + a4,2) * b2,2
H18 = a2,1 * (b1,1 + b1,2 + b5,2)
H19 = -a2,3 * (b3,1 + b3,2 + b5,2)
H20 = (-a1,5 + a2,1 + a2,3 - a2,5) * (-b1,1 - b1,2 + b1,4 - b5,2)
H21 = (a2,1 + a2,3 - a2,5) * b5,2
H22 = (a1,3 - a1,4 - a2,4) * (b1,1 + b1,2 - b1,4 - b3,1 - b3,2 + b3,4 + b4,4)
H23 = a1,3 * (-b3,1 + b3,4 + b4,4)
H24 = a1,5 * (-b4,4 - b5,1 + b5,4)
H25 = -a1,1 * (b1,1 - b1,4)
H26 = (-a1,3 + a1,4 + a1,5) * b4,4
H27 = (a1,3 - a3,1 + a3,3) * (b1,1 - b1,4 + b1,5 + b3,5)
H28 = -a3,4 * (-b3,5 - b4,1 - b4,5)
H29 = a3,1 * (b1,1 + b1,5 + b3,5)
H30 = (a3,1 - a3,3 + a3,4) * b3,5
H31 = (-a1,4 - a1,5 - a3,4) * (-b4,4 - b5,1 + b5,4 - b5,5)
H32 = (a2,1 + a4,1 + a4,4) * (b1,3 - b4,1 - b4,2 - b4,3)
H33 = a4,3 * (-b3,1 - b3,3)
H34 = a4,4 * (-b1,3 + b4,1 + b4,3)
H35 = -a4,5 * (b1,3 + b5,1 + b5,3)
H36 = (a2,3 - a2,5 - a4,5) * (b3,1 + b3,2 + b3,3 + b5,2)
H37 = (-a4,1 - a4,4 + a4,5) * b1,3
H38 = (-a2,3 - a3,1 + a3,3 - a3,4) * (b3,5 + b4,1 + b4,2 + b4,5)
H39 = (-a3,1 - a4,1 - a4,4 + a4,5) * (b1,3 + b5,1 + b5,3 + b5,5)
H40 = (-a1,3 + a1,4 + a1,5 - a4,4) * (-b3,1 - b3,3 + b3,4 + b4,4)
H41 = (-a1,1 + a4,1 - a4,5) * (b1,3 + b3,1 + b3,3 - b3,4 + b5,1 + b5,3 - b5,4)
H42 = (-a2,1 + a2,5 - a3,5) * (-b1,1 - b1,2 - b1,5 + b4,1 + b4,2 + b4,5 - b5,2)
H43 = a2,4 * (b4,1 + b4,2)
H44 = (a2,3 + a3,2 - a3,3) * (b2,2 - b3,1)
H45 = (-a3,3 + a3,4 - a4,3) * (b3,5 + b4,1 + b4,3 + b4,5 + b5,1 + b5,3 + b5,5)
H46 = -a3,5 * (-b5,1 -b5,5)
H47 = (a2,1 - a2,5 - a3,1 + a3,5) * (b1,1 + b1,2 + b1,5 - b4,1 - b4,2 - b4,5)
H48 = (-a2,3 + a3,3) * (b2,2 + b3,2 + b3,5 + b4,1 + b4,2 + b4,5)
H49 = (-a1,1 - a1,3 + a1,4 + a1,5 - a2,1 - a2,3 + a2,4 + a2,5) * (-b1,1 - b1,2 + b1,4)
H50 = (-a1,4 - a2,4) * (b2,2 - b3,1 - b3,2 + b3,4 - b4,2 + b4,4)
H51 = a2,2 * (b2,1 + b2,2 - b5,1)
H52 = a4,2 * (b1,1 + b2,1 + b2,3)
H53 = -a1,2 * (-b2,1 + b2,4 + b4,1)
H54 = (a1,2 + a1,4 - a2,2 - a2,5 - a3,2 + a3,3 - a4,2 + a4,3 - a4,4 - a4,5) * b2,3
H55 = (a1,4 - a4,4) * (-b2,3 + b3,1 + b3,3 - b3,4 + b4,3 - b4,4)
H56 = (a1,1 - a1,5 - a4,1 + a4,5) * (b3,1 + b3,3 - b3,4 + b5,1 + b5,3 - b5,4)
H57 = (-a3,1 - a4,1) * (-b1,3 - b1,5 - b2,5 - b5,1 - b5,3 - b5,5)
H58 = (-a1,4 - a1,5 - a3,4 - a3,5) * (-b5,1 + b5,4 - b5,5)
H59 = (-a3,3 + a3,4 - a4,3 + a4,4) * (b4,1 + b4,3 + b4,5 + b5,1 + b5,3 + b5,5)
H60 = (a2,5 + a4,5) * (b2,3 - b3,1 - b3,2 - b3,3 - b5,2 - b5,3)
H61 = (a1,4 + a3,4) * (b1,1 - b1,4 + b1,5 - b2,5 - b4,4 + b4,5 - b5,1 + b5,4 - b5,5)
H62 = (a2,1 + a4,1) * (b1,2 + b1,3 + b2,2 - b4,1 - b4,2 - b4,3)
H63 = (-a3,3 - a4,3) * (-b2,3 - b3,3 - b3,5 - b4,1 - b4,3 - b4,5)
H64 = (a1,1 - a1,3 - a1,4 + a3,1 - a3,3 - a3,4) * (b1,1 - b1,4 + b1,5)
H65 = (-a1,1 + a4,1) * (-b1,3 + b1,4 + b2,4 - b5,1 - b5,3 + b5,4)
H66 = (a1,1 - a1,2 + a1,3 - a1,5 - a2,2 - a2,5 - a3,2 + a3,3 - a4,1 + a4,2) * b2,4
H67 = (a2,5 - a3,5) * (b1,1 + b1,2 + b1,5 - b2,5 - b4,1 - b4,2 - b4,5 + b5,2 + b5,5)
H68 = (a1,1 + a1,3 - a1,4 - a1,5 - a4,1 - a4,3 + a4,4 + a4,5) * (-b3,1 - b3,3 + b3,4)
H69 = (-a1,3 + a1,4 - a2,3 + a2,4) * (-b2,4 - b3,1 - b3,2 + b3,4 - b5,2 + b5,4)
H70 = (a2,3 - a2,5 + a4,3 - a4,5) * (-b3,1 - b3,2 - b3,3)
H71 = (-a3,1 + a3,3 - a3,4 + a3,5 - a4,1 + a4,3 - a4,4 + a4,5) * (-b5,1 - b5,3 - b5,5)
H72 = (-a2,1 - a2,4 - a4,1 - a4,4) * (b4,1 + b4,2 + b4,3)
H73 = (a1,3 - a1,4 - a1,5 + a2,3 - a2,4 - a2,5) * (b1,1 + b1,2 - b1,4 + b2,4 + b5,2 - b5,4)
H74 = (a2,1 - a2,3 + a2,4 - a3,1 + a3,3 - a3,4) * (b4,1 + b4,2 + b4,5)
H75 = - (a1,2 + a1,4 - a2,2 - a2,5 - a3,1 + a3,2 + a3,4 + a3,5 - a4,1 + a4,2) * b2,5
H76 = (a1,3 + a3,3) * (-b1,1 + b1,4 - b1,5 + b2,4 + b3,4 - b3,5)

These calculations are used to get the numbers for the 4×5 matrix that is the result of the multiplication:

C1,1 = -H10 + H12 + H14 - H15 - H16 + H53 + H5 - H66 - H7
C2,1 = H10 + H11 - H12 + H13 + H15 + H16 - H17 - H44 + H51
C3,1 = H10 - H12 + H15 + H16 - H1 + H2 + H3 - H4 + H75
C4,1 = -H10 + H12 - H15 - H16 + H52 + H54 - H6 - H8 + H9
C1,2 = H13 + H15 + H20 + H21 - H22 + H23 + H25 - H43 + H49 + H50
C2,2 = -H11 + H12 - H13 - H15 - H16 + H17 + H18 - H19 - H21 + H43 + H44
C3,2 = -H16 - H19 - H21 - H28 - H29 - H38 + H42 + H44 - H47 + H48
C4,2 = H11 - H12 - H18 + H21 - H32 + H33 - H34 - H36 + H62 - H70 
C1,3 = H15 + H23 + H24 + H34 - H37 + H40 - H41 + H55 - H56 - H9
C2,3 = -H10 + H19 + H32 + H35 + H36 + H37 - H43 - H60 - H6 - H72
C3,3 = -H16 - H28 + H33 + H37 - H39 + H45 - H46 + H63 - H71 - H8 
C4,3 = H10 + H15 + H16 - H33 + H34 - H35 - H37 - H54 + H6 + H8 - H9
C1,4 = -H10 + H12 + H14 - H16 + H23 + H24 + H25 + H26 + H5 - H66 - H7 
C2,4 = H10 + H18 - H19 + H20 - H22 - H24 - H26 - H5 - H69 + H73 
C3,4 = -H14 + H16 - H23 - H26 + H27 + H29 + H31 + H46 - H58 + H76
C4,4 = H12 + H25 + H26 - H33 - H35 - H40 + H41 + H65 - H68 - H7 
C1,5 = H15 + H24 + H25 + H27 - H28 + H30 + H31 - H4 + H61 + H64 
C2,5 = -H10 - H18 - H2 - H30 - H38 + H42 - H43 + H46 + H67 + H74
C3,5 = -H10 + H12 - H15 + H28 + H29 - H2 - H30 - H3 + H46 + H4 - H75
C4,5 = -H12 - H29 + H30 - H34 + H35 + H39 + H3 - H45 + H57 + H59

The following Python code is an implementation of this algorithm using 76 multiplications to get 20 numbers for the matrix:

import numpy as np

# 4x5 matrix
A = [[3, -1, 7, 3, 9],
      [-2, 2, -2, 7, 5],
      [-5, 9, 3, 3, 5],
      [-2, 6, 6, 3, 7]]
 # 5x5 matrix 
B = [[1, 1, 0, 4, 0],
      [0, 0, 0, 1, 2],
      [1, 2, 1, 1, 3],
      [4, 0, 2, 0, 3],
      [0, 4, 0,1, 0]]

print("The Rank of Matrix A: ", np.linalg.matrix_rank(A))
print("The Rank of Matrix B: ", np.linalg.matrix_rank(B))

def AlphaTensor4x5by5x5(A, B):
    H1 = np.array(A) [2,1] * (-np.array(B) [1,0] - np.array(B) [1,4] - np.array(B) [2,0])
    H2 = (np.array(A) [1,1] + np.array(A) [1,4] - np.array(A) [2,4]) * (-np.array(B) [1,4] - np.array(B) [4,0])
    H3 = (-np.array(A) [2,0] - np.array(A) [3,0] + np.array(A) [3,1]) * (-np.array(B) [0,0] + np.array(B) [1,4])
    H4 = (np.array(A) [0,1] + np.array(A) [0,3] + np.array(A) [2,3]) * (-np.array(B) [1,4] - np.array(B) [3,0])
    H5 = (np.array(A) [0,4] + np.array(A) [1,1] + np.array(A) [1,4]) * (-np.array(B) [1,3] + np.array(B) [4,0])
    H6 = (-np.array(A) [1,1] - np.array(A) [1,4] - np.array(A) [3,4]) * (np.array(B) [1,2] + np.array(B) [4,0])
    H7 = (-np.array(A) [0,0] + np.array(A) [3,0] - np.array(A) [3,1]) * (np.array(B) [0,0] + np.array(B) [1,3])
    H8 = (np.array(A) [2,1] - np.array(A) [2,2] - np.array(A) [3,2]) * (-np.array(B) [1,2] + np.array(B) [2,0])
    H9 = (-np.array(A) [0,1] - np.array(A) [0,3] + np.array(A) [3,3]) * (np.array(B) [1,2] + np.array(B) [3,0])
    H10 = (np.array(A) [1,1] + np.array(A) [1,4]) * np.array(B) [4,0]
    H11 = (-np.array(A) [1,0] - np.array(A) [3,0] + np.array(A) [3,1]) * (-np.array(B) [0,0] + np.array(B) [1,1])
    H12 = (np.array(A) [3,0] - np.array(A) [3,1]) * np.array(B) [0,0]
    H13 = (np.array(A) [0,1] + np.array(A) [0,3] + np.array(A) [1,3]) * (np.array(B) [1,1] + np.array(B) [3,0])
    H14 = (np.array(A) [0,2] - np.array(A) [2,1] + np.array(A) [2,2]) * (np.array(B) [1,3] + np.array(B) [2,0])
    H15 = (-np.array(A) [0,1] - np.array(A) [0,3]) * np.array(B) [3,0]
    H16 = (-np.array(A) [2,1] + np.array(A) [2,2]) * np.array(B) [2,0]
    H17 = (np.array(A) [0,1] + np.array(A) [0,3] - np.array(A) [1,0] + np.array(A) [1,1] - np.array(A) [1,2] + np.array(A) [1,3] - np.array(A) [2,1] + np.array(A) [2,2] - np.array(A) [3,0] + np.array(A) [3,1]) * np.array(B) [1,1]
    H18 = np.array(A) [1,0] * (np.array(B) [0,0] + np.array(B) [0,1] + np.array(B) [4,1])
    H19 = -np.array(A) [1,2] * (np.array(B) [2,0] + np.array(B) [2,1] + np.array(B) [4,1])
    H20 = (-np.array(A) [0,4] + np.array(A) [1,0] + np.array(A) [1,2] - np.array(A) [1,4]) * (-np.array(B) [0,0] - np.array(B) [0,1] + np.array(B) [0,3] - np.array(B) [4,1])
    H21 = (np.array(A) [1,0] + np.array(A) [1,2] - np.array(A) [1,4]) * np.array(B) [4,1]
    H22 = (np.array(A) [0,2] - np.array(A) [0,3] - np.array(A) [1,3]) * (np.array(B) [0,0] + np.array(B) [0,1] - np.array(B) [0,3] - np.array(B) [2,0] - np.array(B) [2,1] + np.array(B) [2,3] + np.array(B) [3,3])
    H23 = np.array(A) [0,2] * (-np.array(B) [2,0] + np.array(B) [2,3] + np.array(B) [3,3])
    H24 = np.array(A) [0,4] * (-np.array(B) [3,3] - np.array(B) [4,0] + np.array(B) [4,3])
    H25 = -np.array(A) [0,0] * (np.array(B) [0,0] - np.array(B) [0,3])
    H26 = (-np.array(A) [0,2] + np.array(A) [0,3] + np.array(A) [0,4]) * np.array(B) [3,3]
    H27 = (np.array(A) [0,2] - np.array(A) [2,0] + np.array(A) [2,2]) * (np.array(B) [0,0] - np.array(B) [0,3] + np.array(B) [0,4] + np.array(B) [2,4])
    H28 = -np.array(A) [2,3] * (-np.array(B) [2,4] - np.array(B) [3,0] - np.array(B) [3,4])
    H29 = np.array(A) [2,0] * (np.array(B) [0,0] + np.array(B) [0,4] + np.array(B) [2,4])
    H30 = (np.array(A) [2,0] - np.array(A) [2,2] + np.array(A) [2,3]) * np.array(B) [2,4]
    H31 = (-np.array(A) [0,3] - np.array(A) [0,4] - np.array(A) [2,3]) * (-np.array(B) [3,3] - np.array(B) [4,0] + np.array(B) [4,3] - np.array(B) [4,4])
    H32 = (np.array(A) [1,0] + np.array(A) [3,0] + np.array(A) [3,3]) * (np.array(B) [0,2] - np.array(B) [3,0] - np.array(B) [3,1] - np.array(B) [3,2])
    H33 = np.array(A) [3,2] * (-np.array(B) [2,0] - np.array(B) [2,2])
    H34 = np.array(A) [3,3] * (-np.array(B) [0,2] + np.array(B) [3,0] + np.array(B) [3,2])
    H35 = -np.array(A) [3,4] * (np.array(B) [0,2] + np.array(B) [4,0] + np.array(B) [4,2])
    H36 = (np.array(A) [1,2] - np.array(A) [1,4] - np.array(A) [3,4]) * (np.array(B) [2,0] + np.array(B) [2,1] + np.array(B) [2,2] + np.array(B) [4,1])
    H37 = (-np.array(A) [3,0] - np.array(A) [3,3] + np.array(A) [3,4]) * np.array(B) [0,2]
    H38 = (-np.array(A) [1,2] - np.array(A) [2,0] + np.array(A) [2,2] - np.array(A) [2,3]) * (np.array(B) [2,4] + np.array(B) [3,0] + np.array(B) [3,1] + np.array(B) [3,4])
    H39 = (-np.array(A) [2,0] - np.array(A) [3,0] - np.array(A) [3,3] + np.array(A) [3,4]) * (np.array(B) [0,2] + np.array(B) [4,0] + np.array(B) [4,2] + np.array(B) [4,4])
    H40 = (-np.array(A) [0,2] + np.array(A) [0,3] + np.array(A) [0,4] - np.array(A) [3,3]) * (-np.array(B) [2,0] - np.array(B) [2,2] + np.array(B) [2,3] + np.array(B) [3,3])
    H41 = (-np.array(A) [0,0] + np.array(A) [3,0] - np.array(A) [3,4]) * (np.array(B) [0,2] + np.array(B) [2,0] + np.array(B) [2,2] - np.array(B) [2,3] + np.array(B) [4,0] + np.array(B) [4,2] - np.array(B) [4,3])
    H42 = (-np.array(A) [1,0] + np.array(A) [1,4] - np.array(A) [2,4]) * (-np.array(B) [0,0] - np.array(B) [0,1] - np.array(B) [0,4] + np.array(B) [3,0] + np.array(B) [3,1] + np.array(B) [3,4] - np.array(B) [4,1])
    H43 = np.array(A) [1,3] * (np.array(B) [3,0] + np.array(B) [3,1])
    H44 = (np.array(A) [1,2] + np.array(A) [2,1] - np.array(A) [2,2]) * (np.array(B) [1,1] - np.array(B) [2,0])
    H45 = (-np.array(A) [2,2] + np.array(A) [2,3] - np.array(A) [3,2]) * (np.array(B) [2,4] + np.array(B) [3,0] + np.array(B) [3,2]  + np.array(B) [3,4] + np.array(B) [4,0] + np.array(B) [4,2] + np.array(B) [4,4])
    H46 = -np.array(A) [2,4] * (-np.array(B) [4,0] -np.array(B) [4,4])
    H47 = (np.array(A) [1,0] - np.array(A) [1,4] - np.array(A) [2,0] + np.array(A) [2,4]) * (np.array(B) [0,0] + np.array(B) [0,1] + np.array(B) [0,4] - np.array(B) [3,0] - np.array(B) [3,1] - np.array(B) [3,4])
    H48 = (-np.array(A) [1,2] + np.array(A) [2,2]) * (np.array(B) [1,1] + np.array(B) [2,1] + np.array(B) [2,4] + np.array(B) [3,0] + np.array(B) [3,1] + np.array(B) [3,4])
    H49 = (-np.array(A) [0,0] - np.array(A) [0,2]  + np.array(A) [0,3] + np.array(A) [0,4] - np.array(A) [1,0] - np.array(A) [1,2] + np.array(A) [1,3] + np.array(A) [1,4]) * (-np.array(B) [0,0] - np.array(B) [0,1] + np.array(B) [0,3])
    H50 = (-np.array(A) [0,3] - np.array(A) [1,3]) * (np.array(B) [1,1] - np.array(B) [2,0] - np.array(B) [2,1] + np.array(B) [2,3] - np.array(B) [3,1] + np.array(B) [3,3])
    H51 = np.array(A) [1,1] * (np.array(B) [1,0] + np.array(B) [1,1] - np.array(B) [4,0])
    H52 = np.array(A) [3,1] * (np.array(B) [0,0] + np.array(B) [1,0] + np.array(B) [1,2])
    H53 = -np.array(A) [0,1] * (-np.array(B) [1,0] + np.array(B) [1,3] + np.array(B) [3,0])
    H54 = (np.array(A) [0,1] + np.array(A) [0,3] - np.array(A) [1,1] - np.array(A) [1,4] - np.array(A) [2,1] + np.array(A) [2,2] - np.array(A) [3,1] + np.array(A) [3,2] - np.array(A) [3,3] - np.array(A) [3,4]) * np.array(B) [1,2]
    H55 = (np.array(A) [0,3] - np.array(A) [3,3]) * (-np.array(B) [1,2] + np.array(B) [2,0] + np.array(B) [2,2] - np.array(B) [2,3]  + np.array(B) [3,2] - np.array(B) [3,3])
    H56 = (np.array(A) [0,0] - np.array(A) [0,4] - np.array(A) [3,0] + np.array(A) [3,4]) * (np.array(B) [2,0] + np.array(B) [2,2] - np.array(B) [2,3] + np.array(B) [4,0] + np.array(B) [4,2] - np.array(B) [4,3])
    H57 = (-np.array(A) [2,0] - np.array(A) [3,0]) * (-np.array(B) [0,2] - np.array(B) [0,4] - np.array(B) [1,4] - np.array(B) [4,0] - np.array(B) [4,2] - np.array(B) [4,4])
    H58 = (-np.array(A) [0,3] - np.array(A) [0,4] - np.array(A) [2,3] - np.array(A) [2,4]) * (-np.array(B) [4,0] + np.array(B) [4,3] - np.array(B) [4,4])
    H59 = (-np.array(A) [2,2] + np.array(A) [2,3] - np.array(A) [3,2] + np.array(A) [3,3]) * (np.array(B) [3,0] + np.array(B) [3,2] + np.array(B) [3,4] + np.array(B) [4,0] + np.array(B) [4,2] + np.array(B) [4,4])
    H60 = (np.array(A) [1,4] + np.array(A) [3,4]) * (np.array(B) [1,2] - np.array(B) [2,0] - np.array(B) [2,1] - np.array(B) [2,2] - np.array(B) [4,1] - np.array(B) [4,2])
    H61 = (np.array(A) [0,3] + np.array(A) [2,3]) * (np.array(B) [0,0] - np.array(B) [0,3] + np.array(B) [0,4] - np.array(B) [1,4] - np.array(B) [3,3] + np.array(B) [3,4] - np.array(B) [4,0] + np.array(B) [4,3] - np.array(B) [4,4])
    H62 = (np.array(A) [1,0] + np.array(A) [3,0]) * (np.array(B) [0,1] + np.array(B) [0,2] + np.array(B) [1,1] - np.array(B) [3,0] - np.array(B) [3,1] - np.array(B) [3,2])
    H63 = (-np.array(A) [2,2] - np.array(A) [3,2]) * (-np.array(B) [1,2] - np.array(B) [2,2] - np.array(B) [2,4] - np.array(B) [3,0] - np.array(B) [3,2] - np.array(B) [3,4])
    H64 = (np.array(A) [0,0] - np.array(A) [0,2] - np.array(A) [0,3] + np.array(A) [2,0] - np.array(A) [2,2] - np.array(A) [2,3]) * (np.array(B) [0,0] - np.array(B) [0,3] + np.array(B) [0,4])
    H65 = (-np.array(A) [0,0] + np.array(A) [3,0]) * (-np.array(B) [0,2] + np.array(B) [0,3] + np.array(B) [1,3] - np.array(B) [4,0] - np.array(B) [4,2] + np.array(B) [4,3])
    H66 = (np.array(A) [0,0] - np.array(A) [0,1] + np.array(A) [0,2] - np.array(A) [0,4] - np.array(A) [1,1] - np.array(A) [1,4] - np.array(A) [2,1] + np.array(A) [2,2] - np.array(A) [3,0] + np.array(A) [3,1]) * np.array(B) [1,3]
    H67 = (np.array(A) [1,4] - np.array(A) [2,4]) * (np.array(B) [0,0] + np.array(B) [0,1] + np.array(B) [0,4] - np.array(B) [1,4] - np.array(B) [3,0] - np.array(B) [3,1] - np.array(B) [3,4] + np.array(B) [4,1] + np.array(B) [4,4])
    H68 = (np.array(A) [0,0] + np.array(A) [0,2] - np.array(A) [0,3] - np.array(A) [0,4] - np.array(A) [3,0] - np.array(A) [3,2] + np.array(A) [3,3] + np.array(A) [3,4]) * (-np.array(B) [2,0] - np.array(B) [2,2] + np.array(B) [2,3])
    H69 = (-np.array(A) [0,2] + np.array(A) [0,3] - np.array(A) [1,2] + np.array(A) [1,3]) * (-np.array(B) [1,3] - np.array(B) [2,0] - np.array(B) [2,1] + np.array(B) [2,3] - np.array(B) [4,1] + np.array(B) [4,3])
    H70 = (np.array(A) [1,2] - np.array(A) [1,4] + np.array(A) [3,2] - np.array(A) [3,4]) * (-np.array(B) [2,0] - np.array(B) [2,1] - np.array(B) [2,2])
    H71 = (-np.array(A) [2,0] + np.array(A) [2,2] - np.array(A) [2,3] + np.array(A) [2,4] - np.array(A) [3,0] + np.array(A) [3,2] - np.array(A) [3,3] + np.array(A) [3,4]) * (-np.array(B) [4,0] - np.array(B) [4,2] - np.array(B) [4,4])
    H72 = (-np.array(A) [1,0] - np.array(A) [1,3] - np.array(A) [3,0] - np.array(A) [3,3]) * (np.array(B) [3,0] + np.array(B) [3,1] + np.array(B) [3,2])
    H73 = (np.array(A) [0,2] - np.array(A) [0,3] - np.array(A) [0,4] + np.array(A) [1,2] - np.array(A) [1,3] - np.array(A) [1,4]) * (np.array(B) [0,0] + np.array(B) [0,1] - np.array(B) [0,3] + np.array(B) [1,3] + np.array(B) [4,1] - np.array(B) [4,3])
    H74 = (np.array(A) [1,0] - np.array(A) [1,2] + np.array(A) [1,3] - np.array(A) [2,0] + np.array(A) [2,2] - np.array(A) [2,3]) * (np.array(B) [3,0] + np.array(B) [3,1] + np.array(B) [3,4])
    H75 = - (np.array(A) [0,1] + np.array(A) [0,3] - np.array(A) [1,1] - np.array(A) [1,4] - np.array(A) [2,0] + np.array(A) [2,1] + np.array(A) [2,3] + np.array(A) [2,4] - np.array(A) [3,0] + np.array(A) [3,1]) * np.array(B) [1,4]
    H76 = (np.array(A) [0,2] + np.array(A) [2,2]) * (-np.array(B) [0,0] + np.array(B) [0,3] - np.array(B) [0,4] + np.array(B) [1,3] + np.array(B) [2,3] - np.array(B) [2,4])
    C11 = -H10 + H12 + H14 - H15 - H16 + H53 + H5 - H66 - H7
    C21 = H10 + H11 - H12 + H13 + H15 + H16 - H17 - H44 + H51
    C31 = H10 - H12 + H15 + H16 - H1 + H2 + H3 - H4 + H75
    C41 = -H10 + H12 - H15 - H16 + H52 + H54 - H6 - H8 + H9
    C12 = H13 + H15 + H20 + H21 - H22 + H23 + H25 - H43 + H49 + H50
    C22 = -H11 + H12 - H13 - H15 - H16 + H17 + H18 - H19 - H21 + H43 + H44
    C32 = -H16 - H19 - H21 - H28 - H29 - H38 + H42 + H44 - H47 + H48
    C42 = H11 - H12 - H18 + H21 - H32 + H33 - H34 - H36 + H62 - H70 
    C13 = H15 + H23 + H24 + H34 - H37 + H40 - H41 + H55 - H56 - H9
    C23 = -H10 + H19 + H32 + H35 + H36 + H37 - H43 - H60 - H6 - H72
    C33 = -H16 - H28 + H33 + H37 - H39 + H45 - H46 + H63 - H71 - H8 
    C43 = H10 + H15 + H16 - H33 + H34 - H35 - H37 - H54 + H6 + H8 - H9
    C14 = -H10 + H12 + H14 - H16 + H23 + H24 + H25 + H26 + H5 - H66 - H7 
    C24 = H10 + H18 - H19 + H20 - H22 - H24 - H26 - H5 - H69 + H73 
    C34 = -H14 + H16 - H23 - H26 + H27 + H29 + H31 + H46 - H58 + H76
    C44 = H12 + H25 + H26 - H33 - H35 - H40 + H41 + H65 - H68 - H7 
    C15 = H15 + H24 + H25 + H27 - H28 + H30 + H31 - H4 + H61 + H64 
    C25 = -H10 - H18 - H2 - H30 - H38 + H42 - H43 + H46 + H67 + H74
    C35 = -H10 + H12 - H15 + H28 + H29 - H2 - H30 - H3 + H46 + H4 - H75
    C45 = -H12 - H29 + H30 - H34 + H35 + H39 + H3 - H45 + H57 + H59
    # Create matrix C
    C = [[C11, C12, C13, C14, C15], 
         [C21, C22, C23, C24, C25],
         [C31, C32, C33, C34, C35], 
         [C41, C42, C43, C44, C45]]
    return C    

C = AlphaTensor4x5by5x5(A, B)   
print("The Rank of Matrix C: ", np.linalg.matrix_rank(C))

When the above code is executed, it produces the following result:

[[ 3 -1  7  3  9]
 [-2  2 -2  7  5]
 [-5  9  3  3  5]
 [-2  6  6  3  7]]
The Rank of Matrix A:  4
[[1 1 0 4 0]
 [0 0 0 1 2]
 [1 2 1 1 3]
 [4 0 2 0 3]
 [0 4 0 1 0]]
The Rank of Matrix B:  5
[[22 53 13 27 28]
 [24 14 12 -3 19]
 [10 21  9 -3 36]
 [16 38 12 11 39]]
The Rank of Matrix C:  4
Posted in Artificial Intelligence, Programming, Python, Technology | Tagged , , , , | Leave a comment

Reading Pagoda and Goggleworks

On Saturday, August 27, I made another trip to the Reading area. My goal on this trip was to see the famous Reading Pagoda and to check out the Goggleworks Center for the Arts. I have been wanting to do this for years, but never got around to making the long drive down to Berks County. Although I was planning to do a mini-vacation in Reading PA, I don’t think I can afford to do that now. A day trip was sufficient to see these two attractions. I also spent some time wandering around downtown to take some photos.

I had no trouble on the drive down to Reading except for missing a turn on PA 901. I stopped in at a Sheetz to use the restroom and get a bite to eat. I bought a small ham sandwich. I was then able to get back on PA 901. Once I reached Reading I followed my directions to drive through downtown on Penn Street to Perkiomen Avenue. There I found Hill Road and drove up the mountain to the Pagoda. Fortunately there was a car going the same way which I could follow. There are no signs directing you to the Pagoda.

Reading Pagoda

Reading Pagoda

The Reading Pagoda was closed but you could walk around the veranda and see the view of the city. There were a few other tourists there. I took lots of photos. I did not spend much time there. I did not manage to go back down the mountain quite the same way and had to drive through a narrow street with cars parked on both sides of the street. But eventually I found my way to Washington Street which I followed west to reach North 3rd Street. There I found the parking lot for the Goggleworks Center for the Arts.

The first thing you see when you enter Goggleworks is the gift shop. I did not buy anything here because the prints were crazy expensive, like $125. I saw two galleries and then used the restroom. Then I went to the elevator and explored the other floors. There are five floors. I did not find any more art galleries but I did see many artist studios. Some were empty and a few had artists working inside the room. Lots of art work could be seen along the hallway walls. It was quite similar to the Pajama Factory in Williamsport. On the top floor, the 5th floor, there were offices for various arts organizations. I also saw some dance studies for ballet. The only interaction I had with anyone in Reading was with some people in the elevator. I told them I was just a tourist from Williamsport and they expressed surprise that anyone would want to visit Reading PA.

Goggleworks Entrance

Goggleworks Entrance

After spending only an hour or less at Goggleworks I spent the rest of my time walking around downtown Reading PA. I walked all the way up Penn Street to North 10th Street so I could find the Genesius Theatre. From there I walked to Washington Street which I followed back to the Goggleworks parking lot. I could have spent more time exploring the downtown area but it was very hot and I saw most of what I wanted to see. Technically I never did finish my research for this trip.

Genesius Theatre

Genesius Theatre

Reading PA has a large Spanish speaking population and I saw some evidence of that. The signs in Goggleworks were also in Spanish. I saw a group of people surrounding someone speaking Spanish in a megaphone. I assumed this was a small political rally. And I saw many Spanish establishments which make Reading PA look like Spanish Harlem in New York City. Unfortunately my Spanish still isn’t good enough to embolden me to enter a Latino establishment.

Mi Casa Su Casa

Mi Casa Su Casa

Before going home I went to the Barnes & Noble store in the Broadcasting Square Shopping Center and bought two books in Spanish; Poesia completa / Complete Poetry by Jorge Luis Borges and Eva Luna by Isabel Allende. Unfortunately these literary works are probably too challenging for me given my level of Spanish. I also bought a science fiction novel, The Long Way to a Small, Angry Planet by Becky Chambers. I was going to pick up the latest Jurassic World,  Jurassic World: Dominion on DVD but it was twice as expensive as it should have been. I waited until I got home to buy this at Target.

Posted in Pennsylvania, Travel | Tagged , , | Leave a comment

Reading Public Museum and West Reading Penn Avenue

This Saturday I finally made a trip to Reading PA. I have been meaning to explore this city for years, but put it off because it is a bit far to drive. Recently I have been doing research for a short vacation in Reading PA. I might spend a few days there like I did in Lancaster.  I decided to just make a sort of preliminary scouting mission by visiting Reading Public Museum on a day trip.

Driving to Reading PA takes almost three hours and requires following a complicated route. My GPS seemed to have its own ideas about the best route so I had to ignore it for most of the trip. The only serious mistake I made was taking the first exit for PA 901 I came across, which had me going west instead of east. On PA 901 I drove through Minersville which looks like it might be an interesting small town to explore. On Pa 183 I drove past the Bern Reformed United Church of Christ which looked like a distinctive landmark. In any event, I will need to study the towns and highways of Berks County because I had no idea where I was most of the time.

Reading Public Museum

Reading Public Museum

When I  reached Reading Public Museum I had a little trouble finding the parking lot. But I got there a few minutes before the museum opened. I took some photos of the entrance because I was unable to find a decent photo for my notes. I noticed a life sized statue of a painter who seemed to be doing some “en plein air” or outdoor painting of the museum. I have been unable to find any information on this statue. There was some other statues and art work near the building so I took some photos of them, but I did not wander far because the museum would soon be open.

En plein air Statue

En plein air Statue

I paid $10 for admission. I had to use the restroom so I did that first. Then I saw an animatronic figure of the museum’s founder explain what he hoped his museum would accomplish but I did not pay any attention. I climbed the stairs to the first floor.

On the first floor I saw an exhibit of artwork by William Baziotes, a modern artist who lived in Reading PA. His work was in the modernist styles popular in the 1940s; Surrealism, Symbolism, Cubism, and Expressionism. I’m familiar with the major works in those styles but you don’t see much of the work by lesser known artists influenced by the greats.  Next I saw an exhibit on North American Indians and then Latin America. These are the some of the permanent galleries. The Animal Habitats galleries were a collection of taxidermy animals, part of the small natural history collection.

Animal Habitats

Animal Habitats

At the opposite wing of the first floor I found the Ancient Civilizations gallery. This was an impressive collection of Egyptian, Roman, and ancient Greek artifacts. They even had an Egyptian mummy,  Nefrina, from the Ptolemaic period. And they had Greek red-figure vase painting, large amphoras. As a reader of Ancient Greek tragedy, I always like to see artifacts from Ancient Greece. And Egyptian artifacts always make me think of the occult since it is so popular among occultist. The Pennsylvania German and Arms and Armor galleries did not interest me as much.

Ancient Civilizations

Ancient Civilizations

On the second floor, one wing had European and American art. The one piece I especially wanted to see was the statue Girl Drinking From a Shell by Edward Francis McCartan because John Updike describes this sculpture in The Centaur. I bought that book to prepare for my trip to Reading but I have not read it yet. However, I have read many of John Updike’s novels because I used to consider him the chronicler of middle-class life in Pennsylvania. The museum also had two rooms of modern and contemporary art. I know a lot more about modern art than classical art.

Girl Drinking From a Shell

Girl Drinking From a Shell

The other wing of the second floor was taken up by the temporary exhibit, Real Bodies. I did not like this exhibit much because it featured a lot of real, perfectly preserved human bodies and anatomical specimens. I found it to be quite morbid and depressing. I did not take any photos of these body parts because that might be disrespectful or prohibited.

On the ground floor I saw the exhibit The Occult: Demons, Devils, and Witches which mostly consisted of small etchings and drawings under poor lighting conditions.  As usual in a museum you had to exit through the gift shop. I did buy a book “The Reading Public Museum and Art Gallery: Selections from the Permanent Collection” in case I ever want to learn more about the artwork I saw. I have to admit that this is unlikely. I rarely follow up on an art museum visit.

After leaving the museum I took a photo of the Neag Planetarium. Then I explored the park. I’m not sure what this park is called. Google Maps shows it as the Wyomissing Park System but it is also referred to as the Reading Public Museum’s Aboretum. In any event, there were sculptures and statues throughout the grounds of the park which would be highly unusual for a city park. It was a lush and beautiful park. It seemed to be very popular since there were a lot of people about, more than you would find in a state park or a city park.



After leaving the museum parking lot my next goal was to photograph some establishments along Penn Avenue in West Reading. I had not finished my research of this major commercial area but I was finding it hard to find any photos online so I figured I would scout out the area myself. I only had to drive a few blocks north to reach Penn Avenue. My goal was to park at the Parking Lot A of the West Reading Center plaza but I round up driving around the Delaney Circle looking for a place to park. By luck I came across the back entrance to Parking Lot A. All the signs indicated that this was parking for customers of the shopping plaza only so just to be safe I went into the nearby Rite Aid and bought a DVD, Star Trek Enterprise: Season One. I like science fiction but I had never seen any episodes of this show.

To my dismay I found some sort of event was taking place and the street was really crowded. This proved to be the West Reading French Fry Fest. I don’t think this was a major event. Maybe Penn Avenue is always that crowded. The police only had one street blocked off for the food vendors. I tried to walk along Penn Avenue taking photos of establishments as best I could. Since I had not completed my research I was not sure what I would find. I did have lunch at Taste of Crepes. I ordered a Bacon crepe and a root beer float. I saw a Latino family in this restaurant which were the only Latinos I saw on this trip.

Taste of Crepes

Taste of Crepes

After wandering around a bit more I  finally found the record store, Vertigo Music, where I bought a 45 of Joan Jett’s single Crimson and Clover. I took a chance on a strange LP, Jeff Waynes Musical Version of the War of the Worlds. I thought it was worth a laugh and it was only $6.00. Fortunately it proved to be narrated by Richard Burton so it was something I can appreciate. I popped into Symbiote Collectibles which sells comic books and pop culture collectibles but I did not see anything I wanted.

Vertigo Music

Vertigo Music

I might have stayed longer to explore Penn Street more thoroughly but I think the root beer float gave me diarrhea because I began to feel an urgent need to find a restroom. Something about walking around in hot weather and having ice cream seems to do that to me. I did not know where to find a public restroom so I decided to proceed to my final destination, Barnes & Noble, which has a restroom.

Unfortunately, I took the wrong exit leaving West Reading and wound up over in downtown Reading. I think I drove over the Bingaman Street Bridge at one point. Eventually I stopped in at the McDonalds on Lancaster Avenue to use their restroom. After that I finally managed to get onto 422 heading in the right direction. I drove to my final destination, the Barnes & Noble book store at the Broadcasting Square Shopping Center. I wanted to visit this book store because I suspected they would have plenty of books in Spanish and I was right. They had three book cases full of books in español just like the Lancaster Barnes & Noble book store did. I bought three books; Illustrated Spanish-English Student Dictionary, El gran Gatsby by Francis Scott Fitzgerald and Fahrenheit 451 by Ray Bradbury. It took me a long time to decide on these books but eventually I had to settle on the classics which I knew.

Barnes and Noble

Barnes and Noble

I was finally ready to drive home. I tried to follow my GPS device but I got lost and drove far out of my way. Eventually my GPS device had me going north on Route 61. This took me though some unfamiliar towns like Frackville and Ashland and Pottsville. It was not until I got on North 42 that I encountered any familiar towns. I reached Catawissa and then Buckhorn to finally find US 80 West near Bloomsburg. After that I was home free.

Before going home I stopped at the Lycoming Mall where I spent a lot of time looking for a good book. I eventually settled for a new edition of Snow Crash by Neal Stephenson even though I have already read this novel. I also bought three DVDs; Fun With Dick and Jane, Velvet Goldmine, and RV starring Robin Williams because I’ve been watching lots of YouTube videos on van life.

Overall, this was a successful mission. However, I do need to study the highways and towns in the Reading area in order to avoid getting lost on future trips.

Posted in General, Pennsylvania, Travel | Tagged , , , , , | Leave a comment

2022 Central Pennsylvania Festival of the Arts

I debated with myself over whether to write a blog post about this trip, but I’ve decided it is worth while to document changes in attending the festival. I also want a record of the artists who caught my attention.

Yesterday I attended the Central Pennsylvania Festival of the Arts which has not been held for two years due to the pandemic. The festival is mostly held outdoors. I was only exposed to other people on the shuttle bus and in a restaurant.

This year they encouraged visitors to park at Penn State’s West Parking Deck on White Course Drive near the IST Building. This is a large parking garage behind the Westgate Building (formerly known as the Information Sciences and Technology Building) on North Atherton Street. There was a lot of construction going on behind the Westgate Building. I took the shuttle bus to get downtown. The shuttle bus was not a city bus. It was a blue Penn State bus which drove through the Penn State campus to reach downtown. Later on I discovered that you can walk through the Westgate Building and use its overpass to cross North Atherton Street to reach the West Parking Deck.

The first thing I did upon being left off downtown was use the restroom at the Schlow Centre Region Library and pick up an official program guide. I then checked out the nearby BookFest but there was nothing interesting there except for a lot of children’s books. I had a list of three artists I wanted to check out so I found their booths and bought a print from each of them.

The first artist I sought out was Bryan Yung. I like his watercolors of Chinese houses. I bought a print for $55 in cash. I had bought one of his prints during a previous arts festival.

Bryan Yung Booth

Bryan Yung Booth

The second artist I sought out was Z. L. Feng. His watercolors are similar to Bryan Yung’s but he tends to paint trees with bare branches and bright blotches for leaves. I think I paid $30 for one of his prints.  I had bought one of his prints during a previous arts festival.

Z L Feng Booth

Z L Feng Booth

The third artist I sought out was Ellie Moniz. Her watercolors are almost like photos and her themes are Philadelphia. I bought her print of Chinatown, 10th and Arch for $20.00.

Ellie Moniz

Ellie Moniz

I had lunch at Cozy Thai Bistro because I noticed it was open but not too busy. I ordered the Pad Thai with chicken, soup, and a bottle of Pepsi. They did not have waiters until later so I got an order number on a table flag. They brought out my food in a plastic bag even though I was eating in. I was unable to finish all of the Pad Thai.

Now that I had three prints to carry around I decided to take the shuttle back to the parking garage. The shuttle ran every thirty minutes so I had to wait. I noticed some women protesting for abortion (Pro-Choice) so I took a few photos of that. Eventually the shuttle bus arrived and I was able to stash the prints in my car back at the parking garage. The shuttle bus left just as I got back so I had to wait for the next one.

Pro-Choice Protest

Pro-Choice Protest

When I got back downtown I headed for Webster’s Bookstore Cafe whee I bought three books. I hunted all over for their foreign langauges book shelves and eventually found a shelf full of French books. I had to look around the corner at the other side of the book shelf for the Spanish books. The word “Teatro” leaped out at me and I bought the book “Teatro II: O destino morreu de repente” by Alves Redol. Unfortunately this book proved to be in Portuguese. I also bought the plays “Serious Money” by Caryl Churchill and “Life X 3” by Yasmina Reza. I don’t think I needed the “Serious Money” play but this was a student edition. I still have not read this play.

After that I dutifully checked out all the artist booths in the town and on the campus. I think I managed to see them all. I was almost out of money so I collected business cards instead of buying any more prints. I got the following business cards; Eli Helman, Kristin Z. Moger, Ashley Suader Miller. William Lewis, J. Bird Cremeans, Robert C. Flowers Jr, Joe Martino and Kyle A. Wilson.

As I mentioned, after checking out the booths on Burrowes Road I noticed that I was close to the Information Sciences and Technology Building so I might as well walk to the parking garage instead of walking all the way back downtown and waiting for the shuttle bus. I discovered that you can walk up the ramp of the Westgate Building and cross North Atherton Street using its overhead walkway. Other the other side of the building I had to walk past a construction site to reach the West Parking Deck. There seemed to be a lot of construction going on in State College. I noticed an immense block of buildings being built as I drove into the city.

This art festival was very inspiring. I’m still doing creative coding using Processing but I have become less active at it. I did order a book on forms because I think I can create some of the forms in Processing. I am also reading the book “Coding Art”.

On the way home I stopped at the Mexican restaurant Rey Azteca in Mill Hall. I ordered three tacos which came in soft shells stuffed with beef. I did not like these very much.

Posted in Art, Pennsylvania, Travel | Tagged , , , , , , , , | Leave a comment

Second Trip To Lititz

On Saturday May 21, 2022 I made my second trip to Lititz PA. I decided to make this trip because I wanted to take better photos. I was really disappointed with how my photos turned out during my vacation. My digital camera does not take good photos in poor lighting. Unfortunately, there was heavy fog in the morning and I had to drive through fog for almost the entire way until I reached the Mount Joy exit. I followed my directions for reaching Lititz using Pennsylvania Route 722 which had me driving through Manheim. I did not make any driving mistakes on this trip. I am beginning to learn my way around Lancaster County!

I arrived at Lititz at 8:00 a.m. One of the first things I did was photograph the Wilbur Hotel. This hotel is located on the other side of the Wilbur Chocolate Co. Building. I’m not sure how much of the old building is taken up by the hotel. There is some retail space on the ground floor facing North Broad Street. This is a rather large and fancy hotel for such a small town but I guess it is part of the greater Lancaster County tourist accommodation. In other words, I don’t think people stay in Lititz just to visit Lititz.

The Wilbur Hotel

The Wilbur Hotel

After walking all along East Main Street to take better photos along the side of the street in the sun, I went to Cafe Arabella for breakfast just like last time. I ordered a medium Café au lait and a cinnamon and raisin bagel. After getting my table flag I used the rest room because they are few rest facilities along Route 15. I did stop at an Onvo travel plaza with a  Burger King in Duncannon just before reaching the Ranch House restaurant.

Cafe Arabella Interior

Cafe Arabella Interior

After breakfast I had to wait until 10:00 for Aaron’s Books to open although I noticed they opened a little early. I bought two books; a graphic novel, We Live by Eva de la Cruz and Dave Sharpe published by AfterShock Comics and a Battle Angel Alita Vol. 1 manga. I took that purchase back to the car and then went to Purple Robin Reserve where I bought another Margaret Thorn print for $45.00, Pretzels & Chocolate. According to my receipt, I made this purchase at 10:38 a.m. But before going back to the car I stopped in at Sweet Legacy Gourmet where I bought a bag of chocolate covered espresso beans for $8.00 at 10:43 a.m. These were really good.

Sweet Legacy Gourmet

Sweet Legacy Gourmet

For lunch I had fish and chips at Bulls Head Public House. Since this is an iconic restaurant at Lititz I decided I had to eat there. I ordered a cider but they did not have Irish cider and I was told “we’re not an Irish bar” in a huff. Instead I got a glass of Kingston Black which might be an apple cider. I used the restroom here before leaving. With tip, this meal came to $25.00 which is reasonable. I had lunch at 11:09 a.m.

Bulls Head Public House

Bulls Head Public House

After lunch I walked to Lititz Music Company because it was nearby. I bought a double album of Joan Jett And The Blackhearts Greatest Hits for $45.00. I thought this was kind of expensive but record albums are becoming increasingly rare and buying one for nostalgia value is worth it. This album has a copyright of 2010 so it is not a vintage 1980s record.

Lititz Music Company

Lititz Music Company

I had a reservation for a 1:00 p.m. tour at Julius Sturgis Pretzel Bakery but I arrived there early to pay for the tour and wound up taking the 12:30 p.m tour. The tour only took around 15 minutes and cost $4.00 so it was not a big deal. They gave me an Official Pretzel Twister certificate. At the end of the tour I got a small bag of Ton Sturgis Artisan Little Ones pretzels. I picked up a Reading, Berks County travel guide in the waiting room.

Julius Sturgis Pretzel Bakery

Julius Sturgis Pretzel Bakery

After the tour I visited Candy*ology where I bought a Red Fox stuffed animal. I remember I had the small bag of pretzels with me and I was worried that they would try to charge me for it because I did not have it in a bag.

It was a very hot and humid day and eventually I felt exhausted. My right foot still hurt from the blister I got on my vacation. So I did not feel like stretching out my time in Lititz. However, before I left I did check out the Market at the Wilbur and the Reading Caboose which was finally open.

From Lititz I drove to the Barnes & Nobles book store in the Red Rose Commons just north of downtown Lancaster. There I confirmed that they had three book cases of Spanish language books. I bought three books; Life 3.0: Being Human in the Age of Artificial Intelligence by Max Tegmark, Entrevista con el vampiro (Interview With The Vampire) by Anne Rice, and La sombra del viento / Shadow of the Wind by Carlos Ruiz Zafón which is a bestseller in Spain.

Barnes & Nobles

Barnes & Nobles

On the long drive home I finally stopped in at Liverpool along Route 15. This is an impoverished little town with a string of houses that face the highway and the Susquehanna River on the other side of the highway. The only thing of interest in that town is Grumpy’s Books, an used book store in a old mill. The owner greeted me and asked what I was looking for. I asked to see the science fiction books and in particular Jeff VanderMeer books. He did not have any so next I asked about books in Spanish. I bought four books in Spanish which seemed pretty old and rare because these are not books you are likely to come across elsewhere. I think I paid only $15.00 for these four books; Spanish Short Stories by Elijah Clarence Hills and Louise Reinhardt published in 1910, El Sombrero de Tres Picos by J.P. Wickersham Crawford published in 1930, Victorina by Frances Parkingson Keyes, and Quince Cuentos de las Españas by Doris King Arjona and Carlos Vazquest Arjona published in 1971 by Charles Scribner’s Sons.

Grumpy's Books

Grumpy’s Books

I did not get home until around 5:00 p.m. This was an arduous day trip but I did establish that I can drive down to Lancaster County whenever I like. I had three objectives on this trip; Lititz, Barnes & Noble, and Grumpy’s Books and I managed to achieve all three objectives without incident.

Posted in General, Lancaster, Travel | Tagged , , , , , , , , , , | Leave a comment

Lancaster Vacation – Day Three – Trip To Lititz

Having spent two days in downtown Lancaster my plan for the third day of my vacation was to drive to Lititz. This made me a little anxious because I had to leave the parking garage and find my way north. Fortunately I did this without making any mistakes. Exiting the parking garage was a delicate process of driving clear up to the top deck and following the exit signs back down to the ground deck where the exit is located off Chestnut Street. I used my parking ticket to open the gate.

My GPS device guided me through the one way streets until I got to PA-501 at which point it was a straight shoot north to go to Lititz. Along the way I passed the Lancaster Airport which just looked like a huge field. Unfortunately this day was even drearier than the day before which prevented me from getting any good photos. Also my right foot was really hurting me by this time so I was feeling slightly miserable.

I parked at Lititz Springs Park which is very convenient if you get there early enough. I did see it fill up later on in the day. The Lititz Springs Park is a pleasant little park although it was a very wet and muggy day. I saw lots of ducks swimming in the small canal. The first thing I photographed was the Lititz Wall of Remembrance and then the William B. Oehme Gazebo. I then crossed North Broad Street and walked north to find the Toy Soldier Restaurant & Pub. I noticed a Mexican restaurant Chilangos Authentic Mexican Restaurante which I took as further evidence that Latinos were making inroads into Lancaster County. I think there are very few Latinos in Williamsport.

After locating and walking the length of East Main Street I eventually had breakfast at the Cafe Arabella because it was open. I had a blueberry bagel and a large Cafe au Lait. I sat outside the Zest! store and kept on eye on Aaron’s Books across the street which opens at 10:00 a.m. As soon as it was open I went there and bought two books: “Rabbits” by Terry Miles and “Show & Tell: Writers on Writing” published by the University of North Carolina Wilmington. I went back to the car to place this purchase in the back seat.

Aaron's Books

Aaron’s Books

After this I must have gone to the Wilbur Chocolate Retail Store since my receipt shows the time 10:33 a.m. I bought some chocolate covered marshmallows, some chocolates with sea salt, and a bag of chocolate drops. I went back to the car to place this purchase in the back seat.

Next I went to the Julius Sturgis Pretzel Bakery where I bought Spicy Honey Mustard for dipping pretzels, a bag of Horse and Buggy pretzels, and a teddy bear with a “Pretzel Lover” scarf. All this only came to $21.23 which was quite reasonable. I did not do the tour because you have to make a reservation online. My receipt shows that I was there at 11:04 a.m. I went back to the car to place this purchase in the back seat.

Julius Sturgis Pretzel Bakery

Julius Sturgis Pretzel Bakery

Then I went to the Lititz Historical Foundation which opened after 11:00 a.m. I went into their garden before going to the Julius Sturgis Pretzel Bakery because the garden was open to the public. The Lititz Historical Foundation offers tours of a second house but I just went on a self guided tour of the main house. There were several rooms filled with artifacts.

After that I went to Purple Robin Reserve were I bought a giclée print by artist Margaret Thorn Mack & Manco, Ocean City, NJ 2009. This was a bit expensive at $45.00 but I thought it was a great piece of art work to buy on vacation because it really captured the vacation spirit, although I have never been to Ocean City NJ. This of course had to be taken back to the car which was painful with my bad foot. According to my receipt I made this purchase at 11:52 p.m.

I’m pretty sure I had lunch at Chilangos Authentic Mexican Restaurante around noon. I had been keeping my eye on this place to see when it would open. It did not appear to be open until after 12:00 p.m. I was shown to a table on the second floor. I ordered the Enchiladas Rojas o Verdes, 4 chicken enchiladas with green or red sauce, served with lettuce, cheese and sour cream. I had the green sauce. I think it came to $15.09 so I paid that exact amount in cash but left two dollars on the table as a tip. I probably should have eaten at the more iconic Bulls Head Public House but since I was studying Spanish I was more interested in Mexican cuisine. The best thing about Mexican food is the sour cream.

Chilangos Authentic Mexican Restaurante

Chilangos Authentic Mexican Restaurante

After lunch I went to Isabella’s Ice Cream Parlor for desert. I got an ice cream cone with two or three scoops of ice cream which was really too much. I ate it in a hurry because the ice cream was melting. I was pretty much done with Lititz at this point but before I left I walked down South Broad Street and found the Lititz Music Co. store where I bought two CDs; Best of the Eurythmics and the Evita soundtrack.

Isabella's Ice Cream Parlor

Isabella’s Ice Cream Parlor

Instead of driving directly back to the hotel I decided to visit the Barnes and Noble bookstore in the Red Rose Commons shopping mall. I entered the address 1700 Fruitville Pike into my GPS device. I stopped at a Sheetz on Lititz Pike to fill up my gas tank at 1:45 p.m. I managed to drive to the book store without making any driving mistakes. I’m glad I made this detour because I discovered that this store has two entire book cases of books in Spanish. I bought three books in Spanish; Ficciones by Jorge Luis Borges, James Y El Melocoton Gigante by Roald Dahl, and El Laberinto Del Fauno by Guillermo Del Toro, Cornelia Funke. Only the Roald Dahl book is something I could read given my limited vocabulary and even then I would need to Google Translate every page.

Barnes & Nobles Booksellers

Barnes & Nobles Booksellers

Once back at my hotel I spent some time relaxing before heading out for some final activities. First I went to the CVS Pharmacy to make an ATM withdrawal since I had spent a lot of cash in Lititz. I found a Star Wars Solo Blu-ray which I decided to buy since I saw that film on my trip to Boston. My receipt shows that I was there at 4:04 p.m. Next I went to Zoetropolis which I finally found open. I had some deviled eggs with fish roe, an unusual twist on this classic Pennsylvania Dutch dish. Finally I went to Madcap and Company on North Queen Street where I bought a Edgar Allen Poe bookmark.

That was the end of my Lancaster vacation. I had planned to stick around the city on Sunday after checking out of my hotel but my feet were killing me and I did not feel like it. I got up very early and left as soon as possible. I did have some problems with my parking garage ticket. I had to go back to the lobby to get a hotel guest entry/exit ticket so I could get the gate to lift. My GPS device guided me perfectly on the drive home. I stopped at Burger King in Lewisburg for breakfast at 8:00 a.m. and used their restroom. On the log drive home I listened to my Spanish music CDs.

I think my trip went almost perfectly but I was still a bit depressed by the bad weather and my slight injuries. The only real problems were being given two sandwiches, the problem with my hotel key card, and the parking ticket not being accepted when I left. What went well was I drove everywhere without making a single driving mistake. Making a side trip to Lititz is something to be proud of since I don’t usually use my car to get around once I arrive at a city. I had planned this trip way back in 2019 before the pandemic so it was great to finally put these plans into effect.

Posted in General, Lancaster, Travel | Tagged , , , , , , , , , , | Leave a comment

Lancaster Vacation – Day Two

My objective on the second day of my vacation was to take some photos of establishments and landmarks which I forgot on the first day and to visit some museums and other establishments. Unfortunately it was a very cloudy and dreary day so the light was not good for taking photos.

The first thing I did was visit the Central Market because it was open very early at 6:00 p.m. The Central Market was not open on May 12 because that was a Thursday. But it was open on May 13th, a Friday. I wandered around the Central Market but did not see a food court where you could sit and eat. So I only bought a doughnut from an Amish man and ate it on a bench outside.

While I was in the Penn Square area, I located several places I had forgotten to photograph including; the Tellus360 Irish Pub, Pubforge, the Lancaster County Convention Center, the Southern Market Lancaster brick building, Fig Industries, La Cocina Restaurant, and the Demuth Musuem.



After that I walked all the way to the Lancaster Cemetery via Duke Street. Walking though the wet grass got my shoes wet and probably caused the large blister I finally got on my right foot. But I did find the grave of Augusta Bitner. This grave features a life sized statue of the Virgin Mary which is said to be haunted. Finding the grave was a little difficult until I noticed the buildings in the background of the photo in my notes. I was then able to look around and saw the houses which must form the backdrop to her grave, one of which had a pointed tower.

Augusta Bitner Grave

Augusta Bitner Grave

Leaving the cemetery I walked west and it started to rain although just some light showers. I immediately headed back to the hotel to get my umbrella. Once I had my umbrella my objective was to take photos of the places on my list. One of these establishments was Maison restaurant on North Prince Street but this restaurant proved to be permanently closed. Still I took some photos of where it used to be. Next I located Flora’s on North Mulberry Street. This restaurant specializes in Latin American fusion cuisine. Unfortunately this restaurant was closed because the owner’s were on vacation. Nearby was Rachel’s Café & Creperie so I stopped in there for breakfast. I ordered the Rodeo crepe, a glass of orange juice and a coffee. The Rodeo crepe was filled with bacon and eggs and made for a large breakfast. The glass of orange juice was large and the cup of coffee did not come with any milk or cream. Rachel’s Café & Creperie was in a different location on my previous trip to Lancaster in 2010. It was great to finally give this place a try.

Rachel's Café & Creperie

Rachel’s Café & Creperie

After breakfast I found the Shreiner-Concord Cemetery nearby where Thaddeus Stevens’ tomb is located. This small cemetery is surrounded by residential houses so was kind of like a small park. This cemetery is located behind the Fulton Elementary School on West Orange Street.

Thaddeus Stevens' Tomb

Thaddeus Stevens’ Tomb

Next I think I visited the Lancaster Museum of Art at around 10:00 a.m. I must have gone along East Orange Street because I took a photo of the YWCA on the way. At the Lancaster Museum of Art I saw the exhibit of work by Mark Wagner “Art Made From Money”. Lancaster-based artist Mark Wagner shares his thought-provoking and satirical artwork made entirely from deconstructed U.S. dollars to explore the intersection of wealth, power, value, and American identity. This special exhibition features over 50 meticulously constructed pieces and takes a special look into the artist’s creative process. This artist must have been made of money because his art work sure was! All of his art work is made from real money as destroying money is not illegal. I was tempted to buy a catalog but it was $15.00 for just a thin booklet. I’m not made of money! I had trouble getting the door open to leave but the lady in the museum managed to get it open for me.

Lancaster Museum of Art

Lancaster Museum of Art

After leaving the Lancaster Museum of Art I think I went to its sister museum the Demuth Museum. I had visited this museum on my first trip to Lancaster but that was over ten years ago so things would have changed. Instead of going through the arch to the garden in the back to enter the museum you can now enter through the front door. I watched a short film about Charles Demuth’s life and artistic impact. Then I viewed the art work downstairs before climbing the steep set of stairs to the second floor which only had a few display cases of artifacts like the artist’s hat. The final exhibit room was dark but the lights came on when I entered. The exhibition I saw was called “Between Two Worlds” and featured the paintings of artist Helen Berggruen. The second floor art work seemed to be a response to Helen Berggruen’s work by Elizabethtown College Faculty. Only Jeff Bye’s wide painting of the interior of the Parkway Theater in Baltimore MD was interesting.

The Demuth Museum

The Demuth Museum

I don’t remember the exact sequence of events but I did go to Read Rose Books where I bought the hard cover novel “Whitethorn Woods” by Maeve Binchy. I did not particularly want this book but I felt obligated to buy something. I am familiar with this popular Irish novelist from my research for my trip to Dublin. I also went to Winding Way Books which was not exactly where I thought it would be. You enter the front door next to Mr. Suit Records and then climb a steep set of stairs to the second floor to find Winding Way Books down a hall way. I bought two books I found in the Theater section; “In the Boom Boom Room” by David Rabe, “From Option To Open” by Donald Farber. After that I went into a few of the art galleries on the nearby Gallery Row and bought a card at the Freiman Stoltzfus Gallery.

I do know the exact time I went to the CVS Pharmacy on West Lemon Street to use the ATM. It was 1:55 p.m. I also bought some things I thought I would need; Compeed Blister cushions, a travel size of Dove Shampoo for Men, a Dove Moist Bar of soap, and Tylenol Arthritis capsules.

I remember I had some trouble getting back into my room. My key card would not open the door. I went down to the lobby to get a new key card but it still would not open the door. Eventually the maintenance man had to look into the problem. They had the key cards set for room 835 instead of room 825.

For dinner I made an online reservation at Citronnelle, a fancy and expensive French restaurant on West Orange Street. This restaurant was not even in my notes but I saw it on Google Maps. I rested in my hotel room for over an hour before going to the restaurant because my feet were killing me. When I arrived right on time at the restaurant I found the door was locked. I was going to walk away but fortunately I noticed a door bell so I rang that and the waiter instantly opened the door. He knew exactly who I was going to be because I was the only diner at that early hour, 5:30 p.m. The restaurant seemed very fussy and everyone had to wear face masks except for the diners. They made me move even though the restaurant was empty. I ordered the Creamy Crab Croquettes, the Dark Chocolate Soufflé, and a cappuccino. I probably should have ordered a second course but I was not too hungry. While I waited for the crab croquettes I was given two small squares of heavily spiced bread to eat. The Creamy Crab Croquettes turned out to be very mushy and cold but I think they probably were meant to be like that. The Dark Chocolate Soufflé came with some crème brûlée to pour into the cake. The entire meal cost me $55.44 so it was as expensive as a New York City restaurant. I did not mind splurging on my first vacation in almost two years.



After dinner I walked to Penn Square before realizing I had forgotten my umbrella at Citronnelle. I had to walk back to fetch it. Then I walked back to Penn Square  and entered the Annie Bailey’s Irish Public House. I wanted to have a pint at Tellus360 but they seemed to be doing an event. Annie Bailey’s Irish Public House proved to be a traditional Irish pub and not the dive bar I was expected. I sat at the bar and had a Magners Irish Cider, a bottle of the Pear Cider. This is my favorite Irish drink although some Guinness would have been more appropriate. I’m not very familiar with bar etiquette so I just left a dollar tip plainly visible on the bar. I drank that bottle of cider within minutes and returned to my hotel room.

Annie Bailey's Irish Public House

Annie Bailey’s Irish Public House

Although the miserable weather made this a bad day for taking photos, I had managed to visit two museums, two cemeteries, and ate at three establishments I wanted to check out.

Posted in General, Lancaster, Travel | Tagged , , , , , , , , | Leave a comment

Lancaster Vacation – Day One

I have not had a vacation since the pandemic began. But I finally completed a trip I was planning before the pandemic. I spent three days and nights in Lancaster PA. Since international travel might still be risky, I decided to travel within my home state. I usually don’t stay overnight at a place I could visit on a day trip. But Lancaster is kind of far away. I have to drive far south on Route 15 and then far east on various highways to reach Lancaster. It takes over two and half hours of driving and that is a long drive for me. There is plenty to see in Lancaster County so it made sense to spend a few days there. I should note that driving to the Harrisburg International Airport requires following almost the same route.

Fortunately I managed to drive to my destination without making any mistakes thanks to my GPS device. I reviewed the major exits before I left but I accidentally left my cheat sheet at home. It was the only thing I forgot. I was able to pack as much luggage as I liked because I was taking my car. So I had my usual suitcase, my laptop bag, and the small backpack I use on bus trips. My laptop was my HP Pavilion Gaming Laptop and this was the first time I’ve taken it on a trip. I recently got a new smartphone, a Samsung Galaxy A01, but I did not have a case for it.

I stayed at the Holiday Inn Lancaster hotel on the corner of East Chestnut Street and North Queen Street. This hotel is right downtown so it was ideal for exploring the city. I parked in the Duke Street Parking Garage which is right next to the hotel. The entrance to the parking garage is on Duke Street, a one way street going south. I pressed a button to get a parking ticket which I had validated at the front desk. My validated parking ticket was good for three days with in and out privileges. I parked on the 3rd deck.

I did not check into the hotel right away because check in time was not until 3:00 p.m. I did ask to use their restroom which required a key. The restroom was about to be cleaned but the attendant allowed me to use it first. On my first day in the city I took over 400 photos. This was the only day that was not cloudy so I wanted to take advantage of the good light. I had a long list of things to photograph because many establishments in Lancaster are not well documented online.

The first thing I did was cross North Queen Street to the Lancaster County Government Center. I saw a lot of homeless people hanging out around there and Binns Park. I then walked south to Penn Square, the heart of downtown Lancaster. Along the way I saw the 101NQ Building which houses the Cargas software company and the large Rite Aid across the street. When I reached Penn Square I took photos of the Civil War Monument, the Lancaster City Visitor Center, and the Penn Square Fountain. I also found Steinman Park and took a photo of the bronze sculpture of man reading a newspaper. I heard some Spanish being spoken on the streets of Lancaster here. This was interesting to me because I have been studying Spanish for the past eight months.

Holiday Inn Lancaster

Holiday Inn Lancaster

From King Street I quickly found North Price Street and walked up that street to take photos of the Fulton Opera House, the major theater in Lancaster. I’ve even read a book about this theater “Staging Ground:An American Theater and Its Ghosts” by Leslie Stainton. I had breakfast at the Prince Street Cafe. I ordered a coffee and a Classic Egg Sandwich, which was a fried egg and sharp cheddar cheese on a croissant. They gave me a table flag and brought the sandwich to me after a long wait. But I was only given a cup for the coffee and had trouble figuring out where to get the coffee.

After breakfast I continued walking up North Prince Street and came across the Pennsylvania College of Art and Design. This was one of the major institutions I wanted to photograph because surprisingly there are no decent photos of this private art college online. I then got a hankering to do some shopping so I went to DogStar Books, an independent book store far west on West Lemon Street. I don’t quite recall but I must have walked past the CVS Pharmacy and the Lemon Street Market along the way. DogStar Books seemed to be strict about wearing face masks so I put one on after being in the store for a few minutes. Unfortunately this made my glasses fog up and made it hard to browse for books. But eventually I settled for a travel guide to Argentina published by DK Eyewitness Travel. The cashier could not find a price but the store owner let me have it for $5.00 which was very reasonable. I did not get a bag so I had to wander around carrying a travel guide to Argentina. I was thinking of joking that I must be in the wrong country because my travel guide was no help in Lancaster. I returned to the Duke Street Parking Garage to put this book in my car but along the way I took a lot more photos.

DogStar Books

DogStar Books

The second bit of shopping I did was at Stans Records on Prince Street. It has been a long time since I was in a proper record store. This was an old retail store that looked a little shabby but that just made it seem authentic to me. I bought a Debbie Harry “Backfired” 45 for old times sake and 3 CDs; Berlin “Love Life”, Enya (self titled album), Joan Jett “I Love Rock N Roll” (double CD with live show). I then returned to the Duke Street Parking Garage to put this purchase in my car. I didn’t keep anything in my hotel room because I didn’t have a room safe and there was no need to pack stuff in a suitcase when I could just leave things in the car. I know I checked in around 2:00 p.m.

Stans Records

Stans Records

At this point I was getting a little hungry so I decided to try one of the Latino restaurants on my list where I might hear some Spanish being spoken. I walked north on Queen Street to reach El Rincón ponceño, a Puerto Rican restaurant. There I ordered a Cuban sandwich and a Sprite although the woman taking orders had trouble figuring out what I wanted. It took them forever to make the sandwich. While I waited she gave out some pick up orders. Eventually I got my order but she gave me two Cuban sandwiches and no drink. She even had trouble figuring out how much change to give me. I sensed something weird about the place but maybe it was just poorly run. Since I was given take out, I went back to my hotel room to eat. I bought a bottle of Coke Classic at the lobby store which had a self checkout machine. Scanning the bottle gave me a little trouble and I was unable to charge it to my room so I used a credit card. The Cuban sandwich was really good but I could only eat half and left the other sandwich in the room’s refrigerator. I never did eat that other one because I figured it would have gone bad by the time I was ready to eat again. These sandwiches cost $10 each so I was out ten dollars.

El Rincón ponceño

El Rincón ponceño

It is a little difficult to remember in what order I did things because I took 400 photos on this first day and wandered all around the city. But I think the next thing I did was take a bus to Franklin & Marshall College. The Queen Street Station was just north of my hotel so it was logical to use the bus to get to the more remote areas of the city. I could have used my car but finding parking would have been a hassle. I bought an all day pass for $3.70. This proved to be merely a receipt print out with a QR code that has to be scanned on the bus. I could find no bus schedules in the waiting area and unfortunately my notes was missing the topic for the bus route I planned to take. But fortunately I remembered it was Route 1/Park City A – Southeast and I got on the right bus. I also knew exactly which stop to look for but the bus window had a shade which made it a bit difficult to see where we were. I got off near the entrance to Franklin & Marshall College and proceeded to walk through the campus to the Phillips Museum of Art. Unfortunately, the Phillips Museum of Art was closed for the summer so I went to the North Museum of Nature and Science instead. This was primarily a children’s museum and I was planning to skip it because of that but it did prove to be interesting enough for an adult. It only cost me $9.00 for admission. I saw some exhibits on dinosaurs. The basement had many display cases of stuffed birds and minerals. The top floor had some art work. It did not take long to see everything. I did use the restroom.

North Museum of Nature and Science

North Museum of Nature and Science

Before leaving the area I walked along College Avenue and found the Philadelphia Alumni Writers House. I also discovered the Susan and Benjamin Winter Visual Arts Center and a  statue of Abraham DePeyster. Abraham de Peyster (July 8, 1657 – August 3, 1728) was the 20th mayor of New York City from 1691 to 1694, and served as Governor of New York, 1700–1701. A duplicate of his New York statue was donated by John Watts de Peyster to Franklin & Marshall College in Lancaster, Pennsylvania, where it is currently placed on Buchanan Avenue. So this statue seems to have little to do with the college.

After a short wait I managed to flag down a bus going back downtown. I did snag a RRTA Ride Guide from the bus before getting off but I forgot to look at it to see when the bus was coming. On the ride back one of the passengers was bugging another passenger for a Spanish lesson. He especially wanted to confirm the word for uncle was tio.  As I recall I got off the bus before it reached the Queen Street Station because it was more convenient to get off on Chestnut Street to go back to my hotel room. The hotel never cleaned my room even though I was there for three days. I had to keep using the same set of towels and filled up the trash cans. Eventually I had to buy a travel size bottle of shampoo and replaced the trash can bags with plastic bags from CVS.

At this point it is hard to remember the order in which I did things but I’m sure I did the following. I walked up North Queen Street and found the Building Character store which is located through an arch way. The Candy Factory co-working space can also be found by going through this arch. Building Character is a cool antiques mall in which the booths are artistically designed to be very attractive. But I was looking for The Caffeinated Bookworm book which sold used books. I found this but the selection was not very good so I did not buy any books. I exited the Building Character antiques mall through the Heritage Press Museum which is connected to the mall.

The Candy Factory

The Candy Factory

I think I then walked backed to Penn Square and eventually found my way to Bravo Supermarket where I bought a Cherry Pepsi and a small jar of instant coffee which was labeled in Spanish, Bustelo Supreme. The Bravo Supermarket is a supermarket chain which offers specialty items for the Hispanic community so it was interesting to see what kinds of food items they offered. My receipt shows I was there at 6:01 p.m. On the way back to my hotel I passed the Lancaster Public Library and saw the Juliana Bookstore sidewalk sign so I entered the library and found the book store. They did not have many books for sale but I did find a Common Usage Dictionary for Spanish, although the print is very small.

Bravo Supermarket

Bravo Supermarket

At some point I went to the Lancaster Sweet Shoppe which is right across the Duke Street Parking Garage and bought a mini sugar cone of coffee ice cream. From there I walked east to Musser Park. This was small park in the midst of a packed residential area which I thought was quite tranquil. The Lancaster Museum of Art is located within this park. I would be tempted to wish Williamsport had such a nice park but we do have Ways Garden Park which is comparable. This was definitely later in the day because the sun was going down and cast strong rays almost horizontally. After visiting the park I returned to my hotel room for the evening. Although I might have wanted to see the city by night, my feet were killing me by this point.

Posted in General, Lancaster, Travel | Tagged , , , , , , , , , | Leave a comment

Studying React

I have not been keeping my blog up to date with the technology I am studying. I am currently focused on Solidity and smart contracts. Client applications for Solidity contracts are usually written in React, a front-end web application framework. Since I was unfamiliar with React, I have been devoting considerable time to studying it. So far I have added several tutorials to my notes. But I have also read two books on React.

The first book was React Explained by Zac Gordon. The code in this book was a little out-of-date but I still managed to get everything working. The second half of the book featured a complete project and used a Firebase database. It covered the create, read, update, and delete operations on the data (i.e. CRUD).

The second book I read was even more out-of-date. Beginning Ethereum & Solidity With React by Greg Lim  was a real pain to get working but I eventually managed to get its React front-end client for an eBay smart contract working. I deployed this contract to the Rinkeby network.

I think I still need to read more books on React but I now understand the basics and I can get it working with smart contracts written in Solidity. Currently I am reading Mastering Blockchain Programming With Solidity by Jitendra Chittoda.

Posted in crypto-currency, Programming | Tagged , , | Leave a comment

5,000 Web Pages in Technology Notes

As I have been studying programming and technology in general, I have been recording what I have learned in my technology notes. I typically create a web page on a topic or to document a code snippet. This serves as my private wiki. I compile these web pages into a help collection which I can plug into Microsoft Document Explorer.

Recently my technology notes have grown to 5,000 web pages! This is an astounding number of web pages. It is the product of 21 years of continuous study. My earliest web page is dated February 05, 2000.

I don’t blog as much as I should about what I am currently studying. Recently I have been learning Solidity, Docker, Node.js, React, Haskell, and machine learning in R. As usual my studying is all over the place and not very focused. However, my primary focus is on decentralized application development (aka blockchain development) because my crypto investments have shown me that this is where the money is. I have been spending a lot of time studying artificial intelligence (machine learning and deep learning) but I doubt I will ever make any money from these skills. Artificial intelligence is more of an intellectual passion of mine. I will admit that it has encouraged me to greatly increase my math skills and programming skills. Learning statistics is extremely valuable and could help me in the decentralized finance sector.

Posted in Programming, Technology | Tagged , , , , | Leave a comment

Return Trip To Bellefonte

Now that most pandemic restrictions have been lifted I can continue to visit Pennsylvania’s cities and towns instead of state parks. Until international travel resumes this will have to do. On Saturday, July 31, 2021 I decided to visit Bellefonte in Centre County. I have only been to Bellefonte once before in 2015, on July 18, 2015. Back then I was using a Fujifilm FinePix JX400 digital camera so my photos were not very good.

After reaching Bellefonte I parked in front of Talleyrand Park. However, I did not feel comfortable parking there because there was a two hour limit and I was uncertain about which parking meter pertained to my parking space. So later on I parked in a small parking lot on the south end of Talleyrand Park off South Water Street. At first I was going to park in the Subway parking lot because it was closed, but then I moved my car to be even safer.

George Grey Barnard Sculpture Garden

George Grey Barnard Sculpture Garden

So my first step was to walk through the Talleyrand Park. I crossed a bridge over Spring Creek and found the George Grey Barnard Sculpture Garden with its Lincoln bust. There were a lot of ducks and geese in the park because people could buy feed to give to them. I found the Bellefonte Historical Railroad car which I might have missed on my previous trip because I have no photos of it from then. Or maybe it is new since 2015. After walking around the park I climbed High Street to the Centre County Courthouse. There were a few vegetable stands there as part of a small farmer’s market. I also saw many people creating chalk drawings on the sidewalks. Later on I came across a group of people judging the chalk drawings. I took lots of photos of the north side of High Street because the light was best on that side on the street. Eventually I turned left to go up North Allegheny Street. I took photos of the Bellefonte Art Museum, the Centre County Library, and various Victorian mansions or large houses until I found the Reynolds Mansion. Along the way I saw the Hastings Mansion at the corner of North Allegheny and Lamb Streets. This impressive building was owned by Governor Hastings in the 1890s. I then returned back downtown and walked back to Talleyrand Park to move my car.

Plaza Centre Antiques

Plaza Centre Antiques

Once my car was safely parked I spent more time in Talleyrand Park. The Train Station Office of the Bellefonte Intervalley Area Chamber was open by then so I picked up a few brochures. I walked back through the park to put the brochures in my car. Then I headed for Plaza Centre Antiques. I bought three DVDs at this antique mall; The Love Guru, Appaloosa, and Basic Instinct.  DVDs are becoming antiques as you can’t find them anywhere except for Walmart, Target, or antique stores. I also bought a heavy textbook, History of the Theatre, sixth edition, ISBN: 9780205128686. It was in pretty good condition and a bargain at $5.00. The floors creaked loudly in this store and the merchandise was yard sale quality. I returned to my car with these purchases because the book made the bag quite heavy.

The Governors' Pub

The Governors’ Pub

My next goal was to eat lunch. I had lunch at the Governors’ Pub just like on my previous trip to Bellefonte. In fact, I had printed my old itinerary and did the exact same things except for going to Penns Cave. I ordered the Fish and Chips at the Governors’ Pub with a root beer for the drink. Halfway through eating I used the restroom just to make sure I would not need to find a bathroom later.

Hastings Mansion

Hastings Mansion

After lunch I walked back to the Centre County Courthouse which was now cleared of tents. I walked up North Allegheny Street again. I took photos of the post office and the Centre County Library. I entered the Bellefonte Art Museum but I found the exhibits so uninteresting that I did not leave any money as a tip. At this point the lowest bill I had was a ten dollar bill and I considered that a too generous tip for their crappy exhibits, most of which were children’s art work. I walked back to the Reynolds Mansion and then far west on West Linn Street to take photos of other Victorian mansions. Upon returning to North Allegheny Street, I walked uphill to as far as Curtain Street. And then after walking back down to Linn Street I walked east on East Linn Street as far as The Queen, a Victorian bed and breakfast. Lunch was beginning to ferment in my stomach so I did not feel like exploring too far.

Victorian House Antiques

Victorian House Antiques

After returning to the center of town, which is the Centre County Courthouse square, I walked down South Allegheny Street to take photos of establishments along this street. I saw the Victorian House Antiques store which stuck out because of its eBay sign. This was the only establishment I entered. It proved to be a more upscale antiques store with some high quality items. For example, I saw a small bar of gold for $89 but it was only the size of a chicklet. I also saw a nice collection of rings which might contain some hidden gems. These items interested me because I have begun to buy some precious metals. I might also  buy some “material wealth” to build up a treasure chest. But I did not buy anything at the Victorian House Antiques store. Upon returning to the Centre County Courthouse square, I climbed up a steep hill to reach the Union Cemetery. The view from the Union Cemetery was spectacular but the grave sites were a little depressing.

Bellefonte Historical Railroad

Bellefonte Historical Railroad

By this time, my bowels were cramping up so I walked all the way back down to Talleyrand Park. I went into the CSV store to buy a copy of the Centre Daily Times. This was on my old itinerary so I decided to do that on this trip too. I paid $1.50 for one of the thinnest newspapers I have ever seen. There were only 20 pages in two sections! Fortunately it occurred to me that the Train Station Office of the Bellefonte Intervalley Area Chamber might have a restroom like the Jim Thorpe trains station has a restroom for tourists. They did have a restroom even though it was extremely small. That brought me a lot of relief!

Bradley's Book Outlet

Bradley’s Book Outlet

My final goal was to drive along Route 150 to the Nittany Mall. I wanted to shop at the Bradley’s Book Outlet and the Barnes & Noble book store. I managed to find my way to the Nittany Mall. I turned right onto Shiloh Road and then left onto East College Avenue to arrive at the entrance of the mall. This mall is really dying. I took several photos inside but most of the stores were gone. Bradley’s Book Outlet was still open but their sign said they were going out of business. I didn’t like their selection of books so I eventually had to settle for The Complete Idiot’s Guide To Screenwriting: Third Edition. This book came with a CD that includes sample screenplays. Although I am planning to write a screenplay I have not begun it yet. Maybe this book will inspire me to get started.

Barnes & Noble

Barnes & Noble

I then drove to the Barnes & Noble book store which is not attached to the Nittany Mall. I had to get back onto Route 150 to reach the Barnes & Noble book store. I went to the Science and Business sections where I really splurged. I bought five books for a total of $115. I bought: The Undoing Project by Michael Lewis, Possible Minds: 25 Ways of Looking at AI edited by John Brockman, The Age of Cryptocurrency by Paul Vigna and Michael J. Casey, T-Minus AI by Michael Kanaan, and Stock Investing for Dummies by Paul Mladjenovic. The reason I bought so many books is that I saw many books that I do not see at the Books-A-Million store in the Lycoming Mall.

Posted in books, General, Pennsylvania, Travel | Tagged , , , , , , , , , , , , , | Leave a comment

Jim Thorpe in 2021

I have not been blogging about my travels. Although I was forced to stop making trips during the pandemic, I did continue to visit state parks. I visited a record number of state parks last year including most of those within driving distance. But there is not much to say about a trip to a start park other than to mention the hiking trails I found.

Yesterday I made my first trip to Jim Thorpe PA since the pandemic. It has been two years since I’ve been to Jim Thorpe. Not much has changed there. They did change the parking situation. They are now using Flowbird parking meters. These parking meters require you to enter your license plate number, which is something I don’t have written down anywhere. I will need to create a card for my wallet with some information that I always need on me, like my employee number and license plate number. Parking for the day is now $12.00. I don’t know how they are enforcing the parking. I placed my ticket on my  dashboard but only after I had been in town for a few hours.

The first establishment I visited was Sellers Books. I spent quite some time searching for a good book and eventually settled on an Eyewitness Travel Guide for Dublin (ISBN:9870789441782) for which I paid $7.61. This was a great find because there aren’t many travel guides specifically for Dublin and I did not have this one. I’m still planning a trip to Dublin but I probably won’t go until 2022. Next I went to Soundcheck Records where I bought a Joan Jet & The Blackhearts Greatest Hits CD for $10.98. This was the only establishment that was still taking any COVID-19 precautions. I had to use their hand sanitizer because “everyone is touching things”. At the Mauch Chunk 5 & 10 I bought a memo book and some pens so I could write down my license plate number. The memo book will go in my travel bag in case I need to write something down in the future.

Lehigh Gorge Scenic Railway

Lehigh Gorge Scenic Railway

After using the restroom at the train station I dropped off my purchases at the car. It was a long walk to my car because the parking lot was full. I had to park near to the bridge to East Jim Thorpe. Then I purchased a ticket for the Lehigh Gorge Scenic Railway. I paid $17.00 for a seat on a standard coach. The train was pulled by a genuine steam engine. The ride lasted 70 minutes and stopped at Old Penn Haven before turning back.

Marion Hose Bar

Marion Hose Bar

Once I got off the train I walked back to my car and placed my parking ticket on my dashboard. Then I went back into town to look for a place to eat. I was planning to eat at Tony Stella’s Encore with its Absinthe Bar but this was one of the few establishments that seems to be permanently closed. Instead I ate at the Marion Hose Bar on West Broadway. I sat at the bar and ordered a Big Dog with French fries and a lemon bubble soda which came in a bottle. Surprisingly, the best part of this meal was the ketchup. This ketchup was absolutely delicious. I ate all my fries and asked for more ketchup to do so.

Classic Cars On Race Street

Classic Cars On Race Street

After eating I did a little more shopping before going home. I saw some antique cars on Race Street. I was going to look for some used books at Serendipity on Race Street but it looks like they have closed permanently. So that was the second casualty of the pandemic. I did enter the Douglas House Marketplace from its Race Street entrance. After heading downstairs I found the Bee Stung shop where I bought an Alice In Wonderland necklace with a key. It was elegant and whimsical notion. I also went though the Emporium of Curious Goods store but did not find anything I wanted to buy.

I stopped in at the Lycoming Mall before going home. I was worried that Books-A-Million might be closed since I got there after 5:00 p.m. but they seemed to have extended their hours. I bought 3 Blu-ray DVDs; Couples Retreat, Get Hard, and Hall Pass (all comedies). I also bought a hardcover science book Fossil Men: The Quest for the Oldest Skeleton and the Origins of Humankind by Kermit Pattison. I have been buying more and more science books because my study of artificial intelligence has exposed me to more hard science and the mathematics behind research.

Posted in General, Pennsylvania, Travel | Tagged , , , , , | Leave a comment

Williamsport Web Developer Finally Has Broadband

I have finally replaced my Verizon DSL service with Xfinity Performance Internet. I should have done this a long time ago. My download speed has gone from 0.73 megabytes per second to 18.2 megabytes per second and my upload speed has gone from 0.13 megabytes per second to 5.90 megabytes per second. This will make it easier to provide good service to my clients since I will be able to download back ups of web sites faster. DSL (Digital Subscriber Line) provides Internet over telephone lines. It is adequate for web browsing but not good enough to keep Windows 10 up-to-date. You cannot stream video or download any files in the gigabyte range over DSL. I was wasting a lot of time waiting for things to download.

I can now upload my photos to Flickr. And I was finally able to install Windows Updates on my HP laptop which is running Windows 10.

I have been doing a lot of experimenting with Internet of Things. One of my favorite IoT devices is the ESP8266 NodeMCU I connected to a OLED screen to keep an eye on the price of Dogecoin and the value of my amount. On Verizon DSL I discovered that this device would not get a signal if any other device was using my WiFi. But with Xfinity WiFi I can use my IoT devices while having a laptop connected to the Internet.

Posted in Internet, Technology, Web | Tagged , , , | Leave a comment

How To Create A Non-Fungible Token On Rarible

I am now interested in non-fungible tokens as a way to market my digital art. I have been creating digital art using Processing, the computer programming language for creating art. The type of art you can create is mostly geometric art or generative art. Some abstract art can be recreated if it is essentially geometric in design. The problem with digital art is that you cannot sell it to art collectors because there is no physical manifestation of the art work. All you can offer is an image file and an image file is not unique. You can copy an image file endlessly. I have thought about creating hardware to display my digital art like an Arduino with a TFT LCD screen or a Raspberry Pi with an e-Ink display. This would serve as a particular physical manifestation of the art work. Unfortunately LCD screens and e-Ink displays are not canvas sized. A lot of the displays for Arduino and Raspberry Pi are tiny.

Non-fungible tokens solve this problem by associating digital art with a token on a blockchain. These digital tokens are unique and can signal ownership of an asset. Although an image file of digital art can be reproduced by anyone, the token ensures that only one person actually owns the digital art as an asset.

Virtual art work has several advantages over physical art work. You don’t have to worry about storing the art work so that it will not be damaged. You don’t have to insure the art work. I once bought an expensive numbered print which was damaged in a flood. I had to throw it out. This will never happen with a NFT. Digital art work can be loaned to a museum without paying for shipping or insurance. The museum simply needs a digital display on which to display the image file you send them. The NFT ensures that they are displaying the “original” even though they are just displaying a copy of an image file. There are now art museums in virtual worlds which display virtual art and the art work is certified as the real deal by the NFT.

Non-fungible tokens allow anyone to become an art collector even if they don’t have the storage space or the insurance to collect fine art. I have bought some interesting art work on eBay which might even be worth something. But often I don’t know what artist created the piece or the provenance of the piece. I don’t even know if I own original art or just a print. A NFT solves this problem because the entire history of the art work is on the blockchain. You will know who created the NFT and how often the token has changed hands. This means any art work associated with a NFT has a well documented provenance. Some smart contracts for NFTs even create a royalty so any subsequent exchange of the asset pays a royalty back to the creator or artist. So let’s say you are a starving artist and you sell a digital painting for $5.00 as a NFT. Decades later you are a famous artist and your NFT is sold to an art museum for 10 million dollars. You would receive a percentage of that sale!

To create a NFT you must mint a token. I found this process to be more complicated and expensive than I was expecting. I minted a token on Rarible, a marketplace for NFTs. To create a NFT on Rarible you must first connect a wallet. You will need a web3 wallet like Metamask or Fortmatic. So the first hurdle is signing up for one of these wallets. I used Fortmatic because I found their API which I tried out a bit. Your wallet will need some Ethereum. You cannot buy Ethereum with a credit card so that is another hurdle. I can purchase Ethereum on Coinbase which is connected to my bank account. After purchasing the Ethereum on Coinbase you need to send it to your Fortmatic wallet. Any sending of crypto on Coinbase requires entering a code which is sent via SMS to your smartphone. So another hurdle is that you need a smartphone with a service plan that includes text messages.

Fortmatic Connect

Fortmatic Connect

After you manage to get some Ethereum into your Fortmatic wallet you  head on over to Rarible and press the connect wallet button. Then you go through the process of connecting via Formatic which requires your email address, your password, and finally a 6 digit code emailed to your email address. This is what I found so complicated! Several times I had to wait for codes to be delivered. I did not have enough Ethereum in my Fortmatic wallet so I had to do this twice. Even after all this there were many steps to follow on Rarible including; approve performing transactions with my wallet, uploading the image file, minting the token, and signing the sell order using my wallet. The fee to mint the token was 0.032628 ETH or around $48.00. This expense is known as the Ethereum gas fee and you must pay it to conduct a transaction or execute a contract on the Ethereum blockchain platform.

Rarible Follow Steps - Upload Files

My first NFT is an image file of blocks on an isometric grid. The height of the blocks is determined by Perlin Noise. This is a technically sophisticated piece of digital art. The blocks suggest a blockchain. Although the script creates random isometric blocks in hills and valleys, I choose a single instance of its random variations. This image file is now stored on the IPFS (InterPlanetary File System), a peer-to-peer hypermedia protocol designed for sharing image files in a distributed way. This ensures that the image file can always be found. It does not just live on a web server which might disappear some day. You can view my NFT on Rarible at where you can place a bid. If I accept your bid you become the new owner of the NFT and are on your way as an art collector building a collection of virtual fine art. Notice that 10% of sales go to the creator. That means that I get 10% of all subsequent sales of this asset. So it might be in my best interest to accept a low bid just to get the ball rolling. A NFT with a history of changing hands might be seen as a good investment. As long as the value of the piece continues to go up my 10% royalty will ensure that I make far more money than the initial low bid I accept.

Rarible - Grayscale Isometric Grid Blocks

Rarible – Grayscale Isometric Grid Blocks

In addition to appearing on Rarible my NFT also appears on the OpenSea marketplace where it can be found at I must say that the search tools on these NFT markets are terrible since you cannot find my art work using its name “Grayscale Isometric Grid Blocks”. This is pretty annoying because discoverability is very important for artists. A starving artist wants to be discovered and an art collector wants to discover particularly striking art works. It will require additional research to find the starving artists that are trying to sell their work as a NFT. Many NFTs are crappy pieces of artwork that were created as get-rich-quick schemes. They are overpriced and not worth the investment. However you might be able to find genuine pieces of fine art that can be acquired at a bargain. A struggling artist has an incentive to accept a low bid for his NFT because it gets the ball rolling and the art collector is taking a risk with NFTs.

OpenSea Listing

OpenSea Listing

In conclusion creating a NFT cost me around $50 and I spent hours going through the process. I don’t think many starving artists are going to see this as their salvation. But I found it worthwhile since I learned a lot about digital assets on the blockchain. Buying these sort of assets with crypto-currency intrigues me because I think fine art is a better asset for long term investment than the crypto-currency itself. I am also pleased that I have placed my digital art on a legitimate art market. I think that makes me a real artist!

Posted in crypto-currency, General, Technology | Tagged , , , , , | Leave a comment

Artificial Intelligence

I have been studying Artificial Intelligence since 2017. That is four years. And I have learned nothing. Well, that is not quite true. I have gotten pretty familiar with the terminology. However, after fours years of intense effort I still don’t know how to do anything with machine learning. I can install the libraries and run the demos or the code in tutorials, but when it comes time to do something with original data I don’t have a clue.

Unfortunately, most tutorials and articles on machine learning are poorly written. They don’t explain the math or the theory. Often they don’t provide more than one example. The example given is usually a toy problem using a classic data set. For example, I have eleven examples in my notes using the Iris Flower data set. To be fair, my study methods are part of the problem. I randomly search for tutorials and copy and paste the code to run the demo.

Fortunately, I have begun to make some real progress by concentrating on a single algorithm or method. I have mastered Linear Regression because it is widely used in statistics. Tutorials on statistics explain linear regression in far greater detail. I can now perform a linear regression in Excel, C#, Python, R Studio, and even Processing (JavaScript). I have also mastered Multiple Regression since that is just Linear Regression using more independent variables. I am poised to master simple Neural Networks since I have successfully used a Python implementation from scratch with multiple data sets.

So far I have read the following books on Artificial Intelligence:

  1. Our Final Invention: Artificial Intelligence and the End of the Human Era James Barrat
  2. Thinking Machines: The Quest for Artificial Intelligence and Where It’s Taking Us Next Luke Dormehl
  3. Machine Learning Ethem Alpaydin
  4. Apocalyptic AI: Visions of Heaven in Robotics, Artificial Intelligence, and Virtual Reality Robert M. Geraci
  5. Artificial Intelligence: The Quest for the Ultimate Thinking Machine Richard Urwin
  6. Natural Language Processing with Python: Analyzing Text with the Natural Language Toolkit Steven Bird, Ewan Klein, Edward Loper
  7. Text Analytics With Python Dipanjan Sarkar
  8. Bayesian Statistics the Fun Way Will Kurt
  9. AIQ: How Artificial Intelligence Works and How We Can Harness Its Power for a Better World Nick Polson, James Scott
  10. Superintelligence: Paths, Dangers, Strategies Nick Bostrom
  11. Introducing Artificial Intelligence: A Graphic Guide Henry Brighton, Howard Selina
  12. Statistical Inference via Data Science: A ModernDive into R and the Tidyverse Albert Y. Kim, Chester Ismay
  13. The Master Algorithm: How the Quest for the Ultimate Learning Machine Will Remake Our World Pedro Domingos
  14. The Quest for Artificial Intelligence Nils J. Nilsson

Currently I am reading Statistics In Plain English by Timothy C. Urdan because you really need to understand statistics to grasp machine learning. I am also reading Practical Machine Learning in R by Fred Nwanganga and Mike Chapple which should prove easy to understand since it does not include much math or theory.

I am doing some free online courses at Kaggle.

Ordinarily I would give up on machine learning because it is just too difficult to learn and it does not appear to have any practical uses for me. But I am fascinated by the topic of artificial intelligence so I keep plugging away. I will say that I have vastly improved my knowledge of math, statistics, graph theory, linear algebra, calculus, combinatorics, and various other computer science topics. I am now more familiar with mathematical notation. I use MathJax to include math equations in my notes which I keep in HTML.

I have not bought much hardware to support my study of artificial intelligence. I have a Jetson Nano and a Neural Compute Stick 2. Eventually I might buy a NVIDIA GPU.

Posted in Artificial Intelligence, General, Programming, Technology | Tagged , , , , , , , | Leave a comment

Turtle Graphics Spiral In C#

As another example of what you can do with graphics in C#, I decided to recreate a famous Turtle Graphics spiral design. I can’t find an official name for this classic design. I decided to call it Spiral of Circles. It has a nautilus shape but you won’t find any sample code by doing a search on “Turtle Graphics nautilus”. There is a version of this design using squares. I did have the code for creating this design using Python or Processing. It took a little experimentation to reproduce it in C#. Part of the solution was to realize that radians needed to be converted to degrees which is why I included the conversion functions in the code. This design requires a rotate and a translate transformation within a loop. I’m not sure you really need to use a GraphicsPath object because I tried that before I solved the other problems.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SpiralOfCircles
    public partial class Form1 : Form

        System.Drawing.Graphics graphicsObj;

        public Form1()

        private void Form1_Paint(object sender, PaintEventArgs e)
            graphicsObj = this.CreateGraphics();

            // Set the SmoothingMode property to smooth the lines.
            graphicsObj.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;

            // This centers what is drawn. Adjusted by 50 pixels.
            graphicsObj.TranslateTransform((graphicsObj.VisibleClipBounds.Width / 2) + 50, (graphicsObj.VisibleClipBounds.Height / 2) - 50, MatrixOrder.Append);
            // This scales everything up
            graphicsObj.ScaleTransform(2, 2);

            // Create pen.
            Pen blackPen = new Pen(Color.Black, 1);

            for (int i = 0; i < 50; i++)
                graphicsObj.RotateTransform((float)degrees((-Math.PI / 18)));

                // Create a GraphicsPath object
                GraphicsPath path = new GraphicsPath();

                // Draw a circle
                path.AddEllipse(0, 0, -i * 3, -i * 3);

                // Create a Matrix object  
                Matrix X = new Matrix();
                X.Translate(i, 0);

                // Apply transformation  
                graphicsObj.DrawPath(blackPen, path);

        /// <summary>
        /// Function to convert degrees to radians
        /// </summary>
        /// <param name="degrees">degree value</param>
        /// <returns>equivalent radian value</returns>
        public static double radians(double degrees)
            double radians = (Math.PI / 180) * degrees;
            return (radians);

        /// <summary>
        /// Function to convert radians to degree 
        /// </summary>
        /// <param name="radians">radian value</param>
        /// <returns>equivalent degree value</returns>
        public static double degrees(double radians)
            double degrees = (180 / Math.PI) * radians;
            return (degrees);
Spiral Of Circles

Spiral Of Circles

Posted in Graphics, Programming | Tagged , , , | Leave a comment

Converting A Processing Sketch To C#

I have invested a lot of time and effort into learning Processing. I mostly use the JavaScript version of Processing since I can then include working demos in my technology notes which are in the form of HTML files compiled into a Microsoft Document Help Collection. I like Processing because it allows me to be creative using my existing programming skills. It has encouraged me to learn more about computer graphics.

Recently I created a Processing sketch to draw direction arrows around a circle. One of my favorite Processing tricks is to divide a circle into equal parts, like pie slices, by finding points around the circle. The purpose of this sketch was to draw direction arrows rotated in the proper direction to point towards these points around the circle. I needed this to illustrate some sketches for directed graphs, a type of graph in Graph Theory. But orienting objects around a circle is a generally useful trick.

My Processing sketch for drawing arrows around a circle can be found at:

The challenge in recreating this sketch in C# is to find an alternative to the matrix stack as implemented in Processing. Processing provides the handy functions pushMatrix() and popMatrix() as explained at C# supports creating a matrix and methods to invert, rotate, scale, and transform matrices. You can then apply the transformation to the graphics object. But there isn’t a matrix stack so it is hard to figure out how to restore the prior coordinate system. After a lot of trial and error I figured out a way to make this work. The trick is to reset the matrix and then apply the transformation back to the graphics object at just the right point in the code.

As I said, this required a lot of trial and error and might not work for a different Processing sketch. You will have to experiment with when to draw things and when to apply transformations. But I was able to recreate my Processing sketch using the C# code shown below. The arrow heads are not perfectly aligned because the DrawPolygon method in C# is not an exact replacement for the beginShape method in Processing.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ArrowsAroundCircle
    public partial class Form1 : Form
        // A global variable
        System.Drawing.Graphics graphicsObj;

        public Form1()

        private void Form1_Paint(object sender, PaintEventArgs e)
            graphicsObj = this.CreateGraphics();

            // Set the SmoothingMode property to smooth the lines.
            graphicsObj.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;

            // Create a grid
            int gridSize = 10;

            for (int x = gridSize; x <= Form1.ActiveForm.Width; x += gridSize)
                for (int y = gridSize; y <= Form1.ActiveForm.Height; y += gridSize)

                    // Draw a grid
                    Pen objPen = new Pen(System.Drawing.Color.LightGray, 1);
                    graphicsObj.DrawLine(objPen, x, 0, x, Form1.ActiveForm.Height);
                    graphicsObj.DrawLine(objPen, x - gridSize, y, Form1.ActiveForm.Width, y);

            // This centers what is drawn
            graphicsObj.TranslateTransform(graphicsObj.VisibleClipBounds.Width / 2, graphicsObj.VisibleClipBounds.Height / 2, MatrixOrder.Append);

            // Create pen.
            Pen blackPen = new Pen(Color.Black, 2);

            // Radius is the diameter divided by two
            int radius = 600 / 2;

            // Draw a set number of points around the radius of the circle to divide the circle into equal parts 
            int NumberOfPoints = 16;
            for (int i = 0; i < NumberOfPoints; i++)
                double angle = i * ((Math.PI * 2) / NumberOfPoints);
                graphicsObj.DrawLine(blackPen, 0, 0, Convert.ToInt32(radius * Math.Cos(angle)), Convert.ToInt32(radius * Math.Sin(angle)));                

            // Draw a circle
            // Equivalent to ellipse(0, 0, 600, 600);
            Rectangle myRectangle = new Rectangle(-300, -300, 600, 600);
            graphicsObj.DrawEllipse(blackPen, myRectangle);

            // Draw the arrows around the circle last
            for (int i = 0; i < NumberOfPoints; i++)
                double angle = i * ((Math.PI * 2) / NumberOfPoints);
                float degrees = 360 / NumberOfPoints;
                ArrowHead(Convert.ToInt32(radius * Math.Cos(angle)), Convert.ToInt32(radius * Math.Sin(angle)), (float)(i * degrees) + 90);       

        /// <summary>
        /// Draw an arrow head at a set position, rotated at a set angle
        /// </summary>
        /// <param name="x">The x position.</param>
        /// <param name="y">The y position.</param>
        /// <param name="t">The angle of rotation.</param>
        private void ArrowHead(float x, float y, float t)
            float r = 4.0F;
            float theta = t;

            // Create a Matrix object  
            Matrix X = new Matrix();

            x = x + graphicsObj.VisibleClipBounds.Width / 2;
            y = y + graphicsObj.VisibleClipBounds.Height / 2;
            X.Translate(x, y);

            // Apply transformation  
            graphicsObj.Transform = X;

            PointF point1 = new PointF(0, -r*2);   
            PointF point2 = new PointF(-r, r*2);   
            PointF point3 = new PointF(r, r*2);
            PointF[] arrowPoints = { point1, point2, point3 };

            // Create pen.
            Pen blackPen = new Pen(Color.Black, 2);

            // Create a brush
            SolidBrush solidBrush = new SolidBrush(Color.Black);
            graphicsObj.DrawPolygon(blackPen, arrowPoints);
            graphicsObj.FillPolygon(solidBrush, arrowPoints);

            // Reset the matrix

            // Apply transformation  
            graphicsObj.Transform = X;

        /// <summary>
        /// Function to convert degrees to radians
        /// </summary>
        /// <param name="degrees">degree value</param>
        /// <returns>equivalent radian value</returns>
        public static double radians(double degrees)
            double radians = (Math.PI / 180) * degrees;
            return (radians);

This will draw the following figure to the window:Arrows Around A Circle

Arrows Around A Circle

Posted in Graphics, Programming | Leave a comment

Computer Science Research

I have not written a blog post in a long time but that does not mean I have not been working on my computer science skills. Actually I have significantly advanced my programming skills. I just have not taken the time to blog about it. While I used to focus exclusively on web development and databases, I have now ventured into pure computer science with a heavier focus on math. For example, I have studied Boolean Algebra, Graph Theory, Linear Algebra (matrix math), Combinatorics with Permutations, and Statistics. Much of that was inspired by my interest in machine learning and artificial intelligence which requires you to be familiar with a lot of advanced math.

Currently I am reading three books to further my programming skills. The Nature of Code by Daniel Shiffman is a great book about how to simulate aspects of nature through code. It covers such topics as vectors, forces, oscillation, particle systems, physics libraries, autonomous agents, cellular automata, fractals, genetic algorithms, and neural networks. This book is a virtual master class in computer science! What I like about this book is that everything is implemented in Processing with a visual representation. I have invested heavily in learning Processing because I am interested in expressing my creative side through creative coding. Many of my art experiments can be found at Open Processing. Currently I am excited by isometric grids so I will be exploring ways to create art that resembles retro video game designs, although I don’t intend to create full games.

Another book I am reading is Statistical Inference via Data Science: A ModernDive into R and the Tidyverse by Chester Ismay and Albert Y. Kim. I found this book online and I have been reading the online version at ModernDive for free, adding all of its material to my notes. This is a book on statistics and data science for the R programming language and R Studio. I am studying statistics because it is a huge component of machine learning and artificial intelligence. But statistics in general is a useful skill for a programmer to learn. It gets me more into data science. This book has a lot of math formulas. I have learned how to add math formulas to my notes using the MathJax JavaScript library which can handle the various types of notation. In addition to this book, I also read Bayesian Statistics The Fun Way by Will Kurt which also gave examples for R Studio.

The final book I am reading is Mathematics for the Digital Age and Programming in Python by Maria Litvin and Gary Litvin. This is more of a high school text book on math which uses Python to implement math theory. It is a little heavy on the math theory and the math is not very advanced. I am just extracting what useful knowledge I can from this book. I would recommend Doing Math with Python by Amit Saha over this book. I am now quite an expert on Python with extensive notes on this programming language. Python is the most popular programming language for machine learning and artificial intelligence so I have studied it extensively.

Posted in Programming, Technology | Tagged , , , , , , , | Leave a comment

WWDBooks E-Commerce Site Shutting Down

I will be shutting down my demonstration Drupal E-Commerce web site, This site was not getting any traffic. It has become an unnecessary expense. I will do my Search Engine Optimization research using my playwriting web site at  I have backed up the web site and its MySQL database.

There does not seem to be much demand for custom E-Commerce web sites. I think most people sell merchandise on Amazon, eBay, or they use hosted E-Commerce web sites.

Posted in Drupal, General, Technology | Tagged , , | Leave a comment

DeepSpeech on the Jetson Nano

DeepSpeech is an open source speech recognition engine developed by Mozilla. It uses machine learning to convert speech to text. Since it relies on TensorFlow and Nvidia’s CUDA it is a natural choice for the Jetson Nano which was designed with a GPU to support this technology. Unfortunately, getting this running is not easy so I thought I would write a helpful bog post with some tips.

First, the hard part of compiling DeepSpeech for the Jetson Nano has already been done for you. Go to and download the deepspeech-0.6.0-cp36-cp36m-linux_aarch64.whl and files from the GitHub repository. That should be all the instruction you need. Unfortunately it is not that easy.

Second, install the Python wheel from the file. You cannot install DeepSpeech without this downloaded file you provide:

sudo pip install deepspeech-0.6.0-cp36-cp36m-linux_aarch64.whl

If you are not familiar with Linux, you may be wondering where to copy the file. Run the following command to determine where to copy the file:

cat /etc/*

This indicates that /usr/local/lib would be a good location so copy the file there:

sudo cp /usr/local/lib

But just copying that file is not enough. You need to run another command so Linux knows about this new shared library:

sudo ldconfig

Finally run the following command to see if DeepSpeech is working:

rsrobbins@nvidia-ai:~$ deepspeech --version

You are supposed to get version numbers for TensorFlow and DeepSpeech but both are blank. At least you are not getting any errors. Next you need to download the pre-trained English models from and extract them. The deepspeech-0.6.1-models.tar.gz file is 1.14 GB so you might want to download this using a computer with a decent Internet connection and copy the file to your Jetson Nano.

You can now transcribe an audio file:

rsrobbins@nvidia-ai:~$ cd deepspeech
rsrobbins@nvidia-ai:~/deepspeech$ deepspeech --model deepspeech-0.6.1-models/output_graph.pbmm --lm deepspeech-0.6.1-models/lm.binary --trie deepspeech-0.6.1-models/trie --audio audio/2830-3980-0043.wav
Loading model from file deepspeech-0.6.1-models/output_graph.pbmm
2020-02-29 14:46:19.470759: I tensorflow/stream_executor/platform/default/] Successfully opened dynamic library
2020-02-29 14:46:19.479426: I tensorflow/stream_executor/cuda/] ARM64 does not support NUMA - returning NUMA node zero
2020-02-29 14:46:19.479575: I tensorflow/core/common_runtime/gpu/] Found device 0 with properties:
name: NVIDIA Tegra X1 major: 5 minor: 3 memoryClockRate(GHz): 0.9216
pciBusID: 0000:00:00.0
2020-02-29 14:46:19.479619: I tensorflow/stream_executor/platform/default/] GPU libraries are statically linked, skip dlopen check.
2020-02-29 14:46:19.479744: I tensorflow/stream_executor/cuda/] ARM64 does not support NUMA - returning NUMA node zero
2020-02-29 14:46:19.479900: I tensorflow/stream_executor/cuda/] ARM64 does not support NUMA - returning NUMA node zero
2020-02-29 14:46:19.479978: I tensorflow/core/common_runtime/gpu/] Adding visible gpu devices: 0
2020-02-29 14:46:20.310523: I tensorflow/core/common_runtime/gpu/] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-02-29 14:46:20.310602: I tensorflow/core/common_runtime/gpu/]      0
2020-02-29 14:46:20.310635: I tensorflow/core/common_runtime/gpu/] 0:   N
2020-02-29 14:46:20.310884: I tensorflow/stream_executor/cuda/] ARM64 does not support NUMA - returning NUMA node zero
2020-02-29 14:46:20.311108: I tensorflow/stream_executor/cuda/] ARM64 does not support NUMA - returning NUMA node zero
2020-02-29 14:46:20.311283: I tensorflow/stream_executor/cuda/] ARM64 does not support NUMA - returning NUMA node zero
2020-02-29 14:46:20.311425: I tensorflow/core/common_runtime/gpu/] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 704 MB memory) -> physical GPU (device: 0, name: NVIDIA Tegra X1, pci bus id: 0000:00:00.0, compute capability: 5.3)
Loaded model in 1.53s.
Loading language model from files deepspeech-0.6.1-models/lm.binary deepspeech-0.6.1-models/trie
Loaded language model in 0.0271s.
Running inference.
experience proof less
Inference took 7.315s for 1.975s audio file.

You might be wondering where the heck is the text from the speech in the audio file? This program does not have a very intuitive user interface. The transcribed text is actually in the output directly after “Running inference” and reads “experience proof less”. The demo WAV file has only three spoken words. The actual speech in the audio file is “experience proves this”.

Although the demo audio files from Mozilla work well enough, you may need to install Sound eXchange to support conversion of audio files. DeepSpeech expects this to be installed. Naturally there is no mention of this requirement in the documentation. Run this command to install SoX:

sudo apt-get install sox

My additional tip is to run DeepSpeech using sudo if you get an error and run it again if the GPU runs out of memory.

Posted in Technology | Tagged , , | Leave a comment