# Action Visualizers

DAHN's *action visualizers* provide a way for human agents to discover and invoke the *actions* offered by the MAP's active holons. These *actions* include the *presentation actions* offered by the DAHN visualizer holons.&#x20;

There are often natural groupings of *actions*. For example, the *undo/redo buttons* naturally go together, as do the set of actions that share a menu. Internally, DAHN organizes *actions* into *action groups* that reflect these natural groupings. *Action groups* may nest (i.e., *action groups* may contain *actions* and/or other *action groups*. Thus, *actions* can be represented internally as an *action hierarchy*.

An example of (a fragment of) the action hierarchy rooted at the Canvas Action Bar is shown below.&#x20;

<div align="left"><img src="https://777163467-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgr-A9gty1QVUBTbFyp%2Fuploads%2FRF8VvRdYqQiwgn4mRgnd%2Fimage.png?alt=media&#x26;token=e038d83d-f6da-457a-94c9-78fc00303450" alt=""></div>

The designer of the *canvas visualizer* makes the initial decisions about the makeup of that visualizer. In the example, the designer has determined that the canvas will include a *Canvas Action Bar.* The *Canvas Action Bar* is an action group (AG) that consists of (among others) a *MAP Action Group*, *DAHN Action Group*, and an *Undo/Redo Action Group*.

The *DAHN Selector Function* will pick a visualizer for each component of this hierarchy. *Actions* and *action groups* are generally presented to human agents via *app bars,* *buttons* and *menus*. The good news is that, when considering how to quickly bootstrap DAHN, a small number of visualizers can satisfy a broad cross-section of situations. From there we can let the creativity of Human Interface developers and the adaptive "pull" of MAP explorers drive innovation.

For example, Google's open-sourced Material Design System defines the following types of *app bars*, *menus*, and *buttons*. There are nuances to how each is configured to appear and behave, but the main point here is that the initial set of action visualizers can be relatively small.

![Material App Bar Choices](https://777163467-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgr-A9gty1QVUBTbFyp%2Fuploads%2FuqrCDirEbydPtuuWXq19%2FScreen%20Shot%202022-03-07%20at%203.46.13%20PM.png?alt=media\&token=c00bdb46-3d76-42e9-b3dc-fdf224fdc1e8)

![Material Menu Types](https://777163467-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgr-A9gty1QVUBTbFyp%2Fuploads%2FvgIPIMYhLBVSN9NMdJVn%2FScreen%20Shot%202022-03-07%20at%203.50.41%20PM.png?alt=media\&token=37c8b9ab-b21b-45b1-8d93-fea250162dc3)

As noted, an action group could also be rendered via a set of radio buttons or (less frequently) via checkboxes. The DAHN Selector Function could use heuristic rules driven, for example, by the count of actions within an action group to select an appropriate visualizer for that group. This is similar to the rules used to select property visualizers for enumerated property types (see [property-visualizers](https://evomimic.gitbook.io/map-book/dahn-human-experience-of-the-map/dahn-visualizers/property-visualizers "mention")).

Individual actions can be represented as items within a menu or via separate buttons. Material's button type are shown below.

![Material Button Types](https://777163467-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgr-A9gty1QVUBTbFyp%2Fuploads%2FvnJRMLXowOwoaLIDjRAv%2FScreen%20Shot%202022-03-07%20at%203.51.55%20PM.png?alt=media\&token=0bf121c5-7e41-4b90-be23-f971011aba62)

Sets of *Actions* could also be represented via *radio buttons* or *check boxes*.&#x20;

For example, the selection of the visualizer for the *Canvas Action Bar AG* could be based on *affinity scores* between the DAHN 2D Canvas Visualizer and the available Canvas Acction Bar Visualizers.&#x20;

## Adaptive Features of Action Visualizers

The grouping of *actions* into *action groups* is based on an *affinity score* on the relationship between *actions* and *action groups*. The *action* is treated as belonging to the *action group* for which it has the greatest affinity. At some point (though probably not initially), DAHN may offer personalization options that allow MAP explorers to alter the membership of these *action groups* by dragging and dropping actions into different groups. The effect of such an action would be to update both the *personal affinity* and *aggregate affinity scores* by increasing the score on the relationship to the *action grou*p where the action was dropped and reducing the score on the relationship to the *group* from which the *action* was removed. The re-grouping of actions will take place immediately for the person initiating the change, but multiple agents will need to reinforce this grouping before it becomes the default action group for this action.

Ordering and visibility within an action affinity group is determined by salience scores within the group.

**Copyright (c) 2022, this book is offered to the world under Creative Commons license** [**CC BY-NC-SA 4.0**](https://creativecommons.org/licenses/by-nc-sa/4.0/)
