4  kultarr: Revisiting Anchors with a different lens for visualisation

Currently, the method of generating anchors has been implemented in a Java package and an R package (Hellweg 2023). However, the R package simply uses the Java package under the hood. While using the package for research purposes it was found the R package to be computationally inefficient and hard to debug as the underlying computation happens in a completely different environment which is difficult to inspect. Therefore it was decided to re-implement the anchors package in a pure R package that is computationally efficient while also being simple to debug and diagnose.

As an intuitive representation of the anchors data structure, S7(Vaughan et al. 2023) classes were used. This definition of Object Oriented Programming in R was cutting edge and experimental but it was safely incorporated into the package smoothly.

The final R package was named kultarr and is available as a development version in Github at https://github.com/janithwanni/kultarr. The name, kultarr (“Kultarr” 2024) was inspired by an endangered small insectivorous nocturnal marsupial inhabiting the arid interior of Australia. The kultarr is classified as endangered in the New South Wales region. Similar to the anchors generation algorithm, the kultarr is notoriously difficult to trap and study and it’s elongated hind feet allows it to rapidly change direction by pivoting on its forefeet (Staff 2018) similar to how the underlying algorithm will use the past knowledge to quickly change directions.

As part of reducing the computation time needed to generate anchors for large datasets two techniques were used as a preliminary solution. Memoisation(Wickham et al. 2021) was used to cache the reward for previously visited states. Parallelization(Vaughan and Dancho 2022) was used to parallel process each observation separately.

In addition a set of convenience functions were implemented to aid in visualisation of Anchors in high dimensions. The S7 classes were passed on to create new data structures that encapsulate the bounds and the associated aesthetics. An article summarizing the aesthetic mapping options can be found in the website for the kultarr package at https://janithwanni.github.io/kultarr/articles/tour_aesthetics.html