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

if you want to modify "a weight" from GEN-generation to next GEN-generation you could use this...

(modifying a weight could be useful if you want to give your production-rules a global drift)

greetings

andré

 

(defun modify-weight (&key weight (step 0.1) type (threshold 0.5) (span '(0 1)) (max-weight 1.0))
  (cond ((or (equal type 'incr) (equal type 'decr)) (progn 
                                                      (setq weight (cond ((equal type 'incr) (incf weight step))
                                                                         ((equal type 'decr) (decf weight step))))
                                                      (if (and (> weight 0) (< weight max-weight))
                                                        (append weight)
                                                        (cond ((>= weight max-weight) (random (- 1 threshold)))
                                                              ((<= weight 0) (+ (random (- 1 threshold)) threshold))))))
        ((equal type 'incr-noreset) (if (< weight max-weight)
                                      (incf weight step)
                                      (append max-weight)))
        ((equal type 'decr-noreset) (if (> weight 0)
                                      (decf weight step)
                                      (append 0)))        
        ((equal type 'rnd) (+ (random (- 1 threshold)) threshold))
        ((equal type 'rnd-span) (rnd-round (first span) (second span)))))

                                                        
;;; EXAMPLES TO TEST THE FUNCTION -> ev. every example a few times to check it

(setf weight 0.1)
;;; counts up until default-max-weight (1.0), then rnd-reset
(setf weight (modify-weight :type 'incr :weight weight :step 0.2))

(setf weight 0.1)
;;; counts up, stays at max-weight
(setf weight (modify-weight :type 'incr-noreset :weight weight :step 0.2 :max-weight 3.0))

(setf weight 1.0)
;;; counts down until 0, then rnd-reset
(setf weight (modify-weight :type 'decr :weight weight :step 0.1))

(setf weight 1.0)
;;; counts up, stays at 0
(setf weight (modify-weight :type 'decr-noreset :weight weight :step 0.1))

(setf weight 1.0)
;;; rnd-weights, larger then threshold
(setf weight (modify-weight :type 'rnd :threshold 0.3))

(setf weight 1.0)
;;; rnd-weights, in SPAN
(setf weight (modify-weight :type 'rnd-span  :span '(0.3 0.6)))

                                                        

 

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.