Jump to content
View in the app

A better way to browse. Learn more.

Opusmodus

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;another little markov-game => markov with "global-tendency"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


;;;a "neutral table with 4 values"
(setq transitions '((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))))
      
;;;subfunctions

(defun filter-first-last (n sequence)
  (car (filter-last n sequence)))

(defun substitute-transition-weight (transition-list value new-weight)
  (loop 
    for j in transition-list
    collect (append (list (first j))
                    (loop repeat (1- (length j))
                      for cnt = 1 then (incf cnt)
                      when (equal (first (nth cnt j)) value)
                      collect (list (first (nth cnt j)) new-weight)
                      else collect (nth cnt j)))))

;;;mainfuction
(defun markov-with-tendency (transitions size generations value)
(loop repeat generations
   with list = (gen-markov-from-transitions 
                 transitions
                 :size size :start 1)
  with weight = 1
  with weight-add = 0

  do (setq transitions (substitute-transition-weight transitions value weight))
  append (setq list (gen-markov-from-transitions transitions :size size :start (filter-first-last 1 list)))
  do (incf weight (incf weight-add))))


;;;some simulations => evaluate!!!
(list-plot 
  (markov-with-tendency transitions 10 20 1)
  :point-radius 0 :style :fill) 

(list-plot 
 (list
  (markov-with-tendency transitions 10 20 1)
  (markov-with-tendency transitions 10 20 2)
  (markov-with-tendency transitions 10 20 4))
  :point-radius 0 :style :fill) 

(list-plot ;;non-neutral-table
  (markov-with-tendency '((1 (1 1) (2 4))
                          (2 (1 1) (4 1))
                          (3 (1 4) (3 5) (4 3))
                          (3 (1 1) (2 4) (3 2))
                          (4 (1 1) (3 2) (4 3))) 10 20 1)
  :point-radius 0 :style :fill) 

 

  • Author

you are right, sorry. no computer with me... think you could replace filter-first-last by: (car (last list))

 

 

  • Author

now edited!

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.