Jump to content

Featured Replies

Posted
;;; little markov-game:

;;; gen-markov => analyze the output => produce new rules => gen-markov
;;; make x-times the list-plot and you will see how the system most of the times
;;; comes to a "constant STATE"

(defun self-analyzing/generating-markov (transitions size generations)
  (loop repeat generations
    with list = (gen-markov-from-transitions 
                 transitions
                 :size size :start 1)
    
    append (setq list (gen-markov-from-transitions 
                       (gen-markov-transitions list)
                       :size size :start (car (last list))))))

;;; a "neutral table with 4 values"
(setf transition-table
	      '((1 (1 1) (2 1) (3 1) (4 1))
                (2 (1 1) (2 1) (3 1) (4 1))
                (3 (1 1) (2 1) (3 1) (4 1))
                (3 (1 1) (2 1) (3 1) (4 1))
                (4 (1 1) (2 1) (3 1) (4 1))))


;;; evaluate a few times and have a look on the output
(list-plot 
 (self-analyzing/generating-markov transition-table 20 20) 
 :point-radius 0 :style :fill)

 

Create an account or sign in to comment


Copyright © 2014-2025 Opusmodus™ Ltd. All rights reserved.
Product features, specifications, system requirements and availability are subject to change without notice.
Opusmodus, the Opusmodus logo, and other Opusmodus trademarks are either registered trademarks or trademarks of Opusmodus Ltd.
All other trademarks contained herein are the property of their respective owners.

Powered by Invision Community

Important Information

Terms of Use Privacy Policy