|>
) to work on older R versionsorient_sgf
with new logic; updated game plotting to use negative coordinates; now all valid SGF board sizes allowedcoord_sgf_original
column if rotation is appliedorient_sgf
function to include diagonals and axesapply_orientations()
, which applies all transformations at oncegenerate_board_sectors()
which assigns sector numbers to board positionscreate_database
functionseq_along
read_sgf
id_maker()
.
sapply_pb()
and lapply_pb()
improved batch processingvalidate_sgf()
enables faster debugging of faulty SGFswrite_tiny_gif()
).write_sgf()
now handles multi-property metadata better.read_sgf
and its dependencies into the package, removing the older versions. The files read, but simplify_game
doesn't work properly nor has it been integrated into read_sgf, so all the downstream operations fail. Gotta fix simplify_game
!parse_sgf
purge_comments
; I was incorrectly selecting any tag ending with C\[
, not just comment tags. So I added a negative lookbehind.encountered_bugs
purge_comments
function; the problem was there were too many commentsparse_sgf
with new version, but still chasing a few bugs having to do with multiple games in the fileparse_sgf
that will totally rocksplit_tag
function and reorganized R files a bit; still working on a better parse_sgf
comment_pattern
, almost fixing iron giant problem but not every scenariocreate_database
function and fixed that parsing problem with inner square brackets that need to be escapedWhitespace normalization (scrub_whitespace()) improves compatibility.
added sgf_to_json
function
update_status
read_sgf
to allow multiple branchesplot_game()
now tracks and updates game state dynamically.id_groups
which is much faster, and re-enabled suicide detection in update_status
because I now trust the algorithmupdate_status()
tracks stone groups, captures, and suicide moves.validate_games()
ensures SGF correctness before processingcount_liberties()
) has been added.Group identification (id_groups()
) ensures stones are properly linked.
fixed typo in DESCRIPTION
added new gif writer for cleaner animated diagrams
fixed bug in the handicap move coding
plot_game
with removal rules, some bugfixeswrite_kifu()
functionwrite_gif()
function, but stone size is weirdplot_game
parse_sgf
outputs game moves, eliminating sgfs letter coordinate systemread_sgf
, though it should be expanded to any invalid sgf, no?write_sgf
, allowing saved game reconstructionorient_sgf
to ensure games are always transformed to a canonical orientation before hashing, which ensures that identical games receive the same hashplot_board
function)(
do not get parsed incorrectlyread_sgf
Cleaner structure Improved SGF parsing Better hash-based game identification Progress-tracking batch processing
new dependencies: {digest}, {stringi}
- parse_sgf()
can handle multiple games per file
- first commit using formal version control
- restructured {kaya} codebase as a legit R package
- total refactor of codebase using regular expressions, starting anew with three functions:
- parse_sgf
uses new splitting logic for identifying tags and values and SHA-1 digest-based hashing replaces hash.maker()
- read_sgf
reads an SGF file and parses it using parse_sgf()
- extract_sgf_tag
extracts SGF metadata tags and cleans encoding issues
- added some new tests, capacity to read files containing multiple games
- added first unusual sgf, containing no moves
tag: EHS paper
version associated with the publication "Strategic social learning and the population dynamics of human behavior: the game of Go", by Bret Beheim, Calvin Thigpen, and Richard McElreath, in Evolution and Human Behavior, Volume 35, Issue 5, pp.351-357 DOI: http://dx.doi.org/10.1016/j.evolhumbehav.2014.04.001
standardized function naming to snake_case
read_sgf()
, plot_board()
, etc.plot_board()
replaces board.maker()
and handles platform-specific graphical settings (Windows, Linux, Mac)read_sgf()
replaces game.table.maker()
, loading SGFs from a specified path instead of assuming working directory.sgf.list.to.string()
ensures correct reformatting of handicap stones before outputtree.flagger()
checks for tree structures more efficientlypattern.saver()
now returns named list (coordinates, colors)standard.position()
has more efficient coordinate mappingsgf_player()
automatically detects game format (matrix, list, SGF string).nemo_finder()
adds error handling for bounding box mismatcheschronography()
now includes opponent ranking data.biography()
formats opponent statistics more clearlysgf.string.to.list()
has improved handling of malformed SGF filestag.extractor()
now checks for multiple left brackets ([
) before a right bracket (]
).tree.flagger()
has improved detection of branching variations in SGF filesstandard.position()
now uses sgf.string.to.list()
internally to ensure move order consistencyboard.maker()
now adjusts aspect ratio dynamically to maintain board symmetrymirror.mirror()
has improved handling of diagonal reflectionsgame.table.maker()
now skips corrupted SGF files instead of failing the entire runduplicate.detector()
is more efficient at duplicate identification by pre-filtering common hashesnemo.finder()
now supports more advanced bounding box configurationssgf.player()
has improved performance for large game databaseskifu.maker()
improved output formatting for PDFs and PNGspattern.saver()
now highlights selected stones dynamically during pattern inputbiography()
now handles missing player records gracefullytagged version associated with dissertation analysis submitted to registrar on 2012-06-21
officially started calling this the "kaya" package
pattern.saver()
now validates bounding box constraints before savingkifu.maker()
now supports plot, PNG, PDF, and PostScript (PS) outputssgf.player()
automatically detects board size (9x9, 13x13, 19x19)game.table.maker()
now processes SGFs more efficientlystandard.position()
now calls sgf.string.to.list()
internallycoordinate.fetcher()
move.extractor()
has been replaced with two modular functions: sgf.string.to.list()
and sgf.list.to.string()
raw.sgf.loader()
has been absorbed into game.table.maker()
string.search()
has been absorbed into nemo.finder()
sgf.string.to.list()
converts an SGF string into a list of moves and colorssgf.list.to.string()
converts an SGF list back to a string formatbounding.box.maker()
creates interactive bounding boxes for searchesnemo.time()
tracks frequency of moves across historical datasetschronography()
analyzes player career history in a datasetbiography()
generates Go career summaries for a playertag.extractor()
more robust to missing bracketshash.maker()
ignores handicap stones when computing the hashmove.extractor()
detects handicap stonesstandard.position()
handles handicap stones correctlygame.table.maker()
is more robust to game tree structurescoordinate.fetcher()
converts letter coordinates to numerical grid positionsstring.search()
replaces seq.search()
database.player()
plays multiple games in sequence from a databasekifu.maker()
generates printable board diagrams (PDF, PNG, PS)click.rectangle()
is a GUI tool for selecting a region on the boardstring.save()
is a GUI tool for selecting a region on the boardboard.maker()
now works on both windows and mac mirror.mirror()
replaces mirror()
raw.sgf.loader()
loads all SGFs in a path at once with progress bar, replacing sgf.loader()
sgf.player()
can display 9x9, 13x13, and 19x19 gamesnemo.finder()
determines next moves across a set of gamesperformance.counts()
computes performance statistics for searched patternsplayer.map()
computes performance statistics for searched patternsplayer.counts()
computes statistics on first-move playerssearch.saver()
& search.loader()
saves/loads search results to a CSV filebetter ability to flag duplicate games and detect patterns via standarized game orientations
more efficient processing of large numbers of SGF files
improved power hash algorithm using modulos
tag.ripper()
to tag.extractor()
, which now checks for missing patterns more intelligentlymove.extractor
removes extra branches from the SGFstandard.position()
computes canonical board orientationshash.maker()
generates unique hash ID's for each game by computes a large sum from the positional encodings of power.id
but then calculating the modulo to create a short numerical IDsgf.loader()
loads all SGFs at once using a progress barduplicate.detector()
identifies duplicate games using hash.maker()
move.table.maker()
is removedsgf.player()
accepts move vectors and single-string SGFsadds functions for duplicate game identification
major visualization functions: board.maker()
, sgf.player()
, and seq.search()
provide graphical tools for rendering Go boards, replaying games, and searching patterns
more robust move extraction that accounts for symmetries with move.extractor()
and mirror()
process.games()
to instead use game.table.maker()
board.maker()
generates a Go board visualization with star points.power.id()
replaces dyer.sig()
for game identification, converting each move position into a numerical value and computing the sum of each value to the power of 7mirror()
generates all eight board symmetriesmove.extractor()
- now has rm.passes=FALSE
argument to remove pass movessapply_pb()
is a progress bar functionseq.search()
is a GUI for drawing pattern searches on Go boardssgf.player()
animates SGF move sequences on a Go boardsgf.faker()
generates synthetic SGF files for testingangle.binner()
categorizes move angles into binsthreedist()
computes geometric distances between move tripletslocate.games()
related to grep
ripper()
to tag.ripper()
process.games()
with new helper functions: move.extractor()
and sgf.loader()
move.table.maker()
converts SGF move data into a structured tabledyer.sig()
is a new function for move-based game signatures, extracting specific moves from an SGF game (e.g., moves at 20, 30, 40) and concatenates them into a single string to use as a fingerprintMy initial experiments with SGF processing, using three functions:
- locate.games()
, a SGF file locator
- ripper()
, a SGF tag+value extractor
- process.games()
for game processing, calls ripper()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.