how to connect lots of apparently different things

Nov 17, 2011 19:39


A very simple business might have two stores of value, a pile of treasure in a warehouse, and a pile of coins in a purse.
The treasure is of various shapes and sizes and qualities; some goblets are ruby-encrusted and others are deeply-graven and so on. We ignore that fact and instead model the aggregate using a single number. (Aside: Ignoring particulars for the sake of convenience is called abstraction, and it's crucial to understand that abstraction is both necessary and dangerous; it is entirely possible, even usual, to abstract wrongly.) Usually accountants speak and write as if the abstracted version of the pile of treasure were a replicating pile of coins, something like: "233 Lire, 6 soldi and 8 denari, and 1 Rai". (Note that since the abstraction is already a fiction, it is quite usual to use fictitious coins such as megadollars or teralire, if they are understood to have specific exchange rates with real currency - again for convenience.)
However, it would be just as feasible to do accounting speaking and writing as if the pile of coins were denominated in treasure. A standard unit of treasure might be the NOMO ("numinous object of mineral origin"), and "A pile of 144 NOMO's worth of coins" is a perfectly reasonable, usable and workable abstract description of a pile of coins.
Alternatively, you could introduce a new currency, perhaps calling it "utils"; that would be fine too.
One of the practices of bookkeeping is to keep a append-only log of events, called a journal. Entries in the journal might look something like this:
11/16/1611 Plundered a village Treasure +12 denari ; trinkets Coins +34 denari 11/17/1611 Wedding gift for Roxim's niece Treasure -20 Lire ; some nice silverware
Each entry has a date, a human-readable narration of what is actually going on, and several deltas, positive or negative, each associated to an account. These deltas are called postings. In order to make this journal a double-entry journal, we also add additional accounts, not representing stores of value, but flows of value entering or exiting the enterprise, and enforce a conservation law, that each entry must balance, that is, sum to zero.

11/16/1611 Plundered a village Treasure +12 denari ; trinkets Coins +34 denari Income:Plunder -46 denari 11/17/1611 Wedding gift for Roxim's niece Treasure -20 Lire ; some nice silverware Expenses:Relatives +20 Lire
Modern software can do the addition, of course, so you are more likely to see journal entries where the last, balancing quantity is elided, like this:
11/16/1611 Plundered a village Treasure +12 denari ; trinkets Coins +34 denari Income:Plunder 11/17/1611 Wedding gift for Roxim's niece Treasure -20 Lire ; some nice silverware Expenses:Relatives
More usually in commerce, there is a pair of dual flows. For example, you might purchase goods with currency (coins move away from you, treasure moves towards you), or you might sell goods for currency (coins move towards you, treasure moves away from you). It's important to understand that the balance demanded by double-entry bookkeeping is NOT the same as this duality; otherwise enforcing the conservation law would preclude the business making a profit, which is ridiculous.

11/15/2011 Purchased some insanely cheap ruby-encrusted goblets Coins -12 denari Treasure +34 Lire ; ruby-encrusted goblets Income:Purchasing 11/16/2011 Sold a set of deeply-graven goblets at an absurd mark-up Treasure -12 denari ; deeply-graven goblets Coins +34 Lire Income:Sales 11/17/2011 Rats or thieves or something Treasure -12 Lire ; that red tapestry Expenses:Shrinkage
(Aside: this format actually can be parsed by ledger and hledger.)
Any given business will have a "chart of accounts", explaining what they're tracking as their stores of value. For example, a retail business might break down their stores of value into categories like inventory showing on the shelves, inventory in the back room, cash. A manufacturer might have one account for raw goods, one for finished goods, and one for work in progress.
Probably less emphasized in the introductory-accounting-education literature, but still important, is the set of standard entries that the journal will have. For example, a retail business might have three common kinds of entries, for purchasing goods in bulk from suppliers, moving goods from the back room to the shelves, and making sales to customers from the shelves. The manufacturer might have common entries for purchasing raw goods, starting a run, finishing a run, and selling finished goods.
Petri nets and metabolic maps are two closely-related kinds of diagrams that express these two structures - the chart of accounts and the common kinds of entries. Petri nets were created by Carl Petri to model chemical processes, and are studied primarily by computer scientists and mathematicians. Metabolic maps are an informal notation used by biologists that has been formalized by various systems biologists.
We can model the chart-of-accounts-and-usual-kinds-of-entries for the simple "businesses" here using software tools for either petri nets or for metabolic maps. See pre-commerce draconic accounting as a CellDesigner metabolic map, or an oversimplified manufacturing business as a CPNTools Petri net.
I have to mention the System Dynamics stock-and-flow diagrams such as introduced by Forrester and used by the authors of Limits to Growth. The System Dynamics people have great prose and philosophy (by comparison to the Petri nets, bond graphs, and metabolic maps people). However, as diagrams, they're a terrible, horrible, very bad graphical notation, and everyone should stop using them immediately. See Jacques Lefevre's paper.
STRIPS is an old formalism used in artificial intelligence. It can be related to this accounting/system-dynamics/chemistry complex too.
A STRIPS model of a planning problem usually consists of a number of so-called "fluents", propositions that change truth-value over time, and operators that can make false fluents true, or make true fluents false. Fluents are somewhat analogous to stores of value in accounting. Similarly they're somewhat analogous to places in petri nets, or species in metabolic maps. Operators are somewhat analogous to transitions in petri nets, or reactions in metabolic maps.
Aside: There's an aspect of STRIPS that isn't entirely obvious can be accomodated in the accounting world - preconditions. However, in the metabolic world, catalysts are actually quite common, and they participate on both sides of a reaction. Similarly, in the petri nets world, a transition can easily both have an arc from a place and an arc back to that same place. This suggests that preconditions be modeled as accounts that participate on both credit and debit sides of the same journal entry, which seems peculiar, but STRIPS as a formalism doesn't incorporate discounting (as most AI formalisms do nowadays), and accounting certainly has a standard way of handling "catalyst/capital" goods - unfortunately, probably several standard ways without much theoretical justification for any of them.
The standard example STRIPS domains are things like: the Towers of Hanoi puzzle, the 15 puzzle, a monkey pushing a crate to get a banana, Sokoban, and various logistics puzzles. However, I'm more interested in agents that continously act in the world, rather than puzzles that are solved and then done. Stavros Vassos created a STRIPS domain for a first-person shooter agent. Aside: We assume that there are perception and action layers around the STRIPS planning core so that the planner "sees" an abstracted, symbolic version of its current situation, something like "You're at waypoint w123, with 72 health, 1 rocket left, and yes, the player is in range." Then when the planner creates its plan, the actions are high-level like "duck into cover point c456, then reload, then jump out." If there's computer vision or trigonometry going on, it's outside the planner core. What would the Vassos's SimpleFPS domain look like, if you pretended it was a business's accounting system? It might look something like this:
Assets: Room (the value of being in the room the agent is in fact in) Inventory (the value of the contents of the agent's backpack) Ground (the value of the items on the ground) Loaded (the value of the ammo in the agent's gun) NPC Health (the value of the NPC's current health) Liabilities: Player Health (the agent is obligated to reduce this to zero) The journal entries would look something like this:
11/10/2011 Move from Entryway to Great Hall Room:Entryway -0.456 utils Room:Great Hall 0.789 utils Income:Motion 11/10/2011 Pick up from ground Ground:Dungeon -10 Rockets @ 0.04 utils Inventory 10 Rockets @ 0.23 utils Income:Pickups 11/10/2011 Reload Inventory -10 Rockets @ 0.23 utils Loaded:Rocket Launcher 10 Rockets @ 0.45 utils Income:Loading 11/10/2011 Attack (melee) Player Health -45 hp @ 1.2 utils Income:Melee 11/10/2011 Attack (ranged) Player Health -150 hp @ 1.2 utils Loaded:Rocket Launcher -1 Rocket @ 0.45 utils Income:Ranged 11/10/2011 Use medkit NPC Health 100 hp @ 0.9 utils Inventory -1 Medkit @ 4.4 utils Income:Healing 11/10/2011 Item spawns Ground:Great Hall 1 Rocket Launcher @ 0.6 utils Income:Spawns
The obvious conclusion is: businesses that systematically use accounting to make decisions might well be comparably intelligent, via exactly analogous mechanisms, to bacteria or simple AI agents. Another possible conclusion is: one of the primary purposes of accounting for managerial decision-making is learning, backing up a crude rule-of-thumb utility function to refine it, the same way that chess engines refine their heuristics via lookahead. If a business is an ongoing concern, and you carefully record a log like this, then you may be able to find a utility function (a valuation/pricing function), and eventually switch (from off-policy or passive reinforcement learning to on-policy or active reinforcement learning) to using greedy look-ahead according to the accounting system to make decisions.
Aside: The accounting journal conveys pretty much the same information as the UML sequence diagram, or the physicist's Feynman diagrams. See Baez.
Some moderately-obscure models of computation depend crucially on this chemistry-and-operators idea. I don't know them well (this is partly an attempt on my part to understand them) but GAMMA, the generalized Abstract Model for Multiset Manipulation might have introduced the chemistry metaphor, and GAMMA inspired CHAM, the Chemical Abstract Machine, which partly inspired CHR, Constraint Handling Rules.
Soar is the other moderately-obscure model of computation that depends crucially on this getting-things-done-with-operators idea, though it doesn't use a chemistry metaphor. I don't know, but I think that Monadic Constraint Programming (which is related to CHR) is one of the paths to "good Soar style". Possibly other production-rule systems such as CLIPS or Jess would benefit from this metaphor, but I don't know them well enough to say definitively.
Previous post Next post
Up