cs-362-markow-model-implementation-for-grid-system