{"id":25080301,"url":"https://github.com/timm/barelogic","last_synced_at":"2025-05-13T00:21:06.058Z","repository":{"id":276056083,"uuid":"928070360","full_name":"timm/barelogic","owner":"timm","description":"Case studies in simpler AI,  elegance, and the wisdom of reduction. Think Fast. Learn Smart. Stay Wild.","archived":false,"fork":false,"pushed_at":"2025-05-07T22:46:09.000Z","size":7573,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T23:29:04.347Z","etag":null,"topics":["ai","data-mining","explainable-ai","multi-objective-optimization","teaching"],"latest_commit_sha":null,"homepage":"https://github.com/timm/barelogic/blob/main/README.md","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-06T02:23:34.000Z","updated_at":"2025-05-07T22:46:12.000Z","dependencies_parsed_at":"2025-02-06T03:27:09.230Z","dependency_job_id":"f05dcd54-f740-48ba-a4a1-faf33cadd18c","html_url":"https://github.com/timm/barelogic","commit_stats":null,"previous_names":["timm/barelogic"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timm%2Fbarelogic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timm%2Fbarelogic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timm%2Fbarelogic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timm%2Fbarelogic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timm","download_url":"https://codeload.github.com/timm/barelogic/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253843975,"owners_count":21972987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","data-mining","explainable-ai","multi-objective-optimization","teaching"],"created_at":"2025-02-07T03:19:54.295Z","updated_at":"2025-05-13T00:21:06.034Z","avatar_url":"https://github.com/timm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003e Bare Logic \u003c/h1\u003e\n\u003ch3\u003eThink Fast. Learn Smart. Stay Wild. \u003cbr\u003e(Case studies in simpler AI,  elegance, and the wisdom of reduction).\u003c/h3\u003e\n\u003cp\u003e\n\u003cimg src=\"/docs/img/barelogic.png\"  width=\"250\"\u003e\n\u003cbr\u003e\n\u003ca href=\"http://github.com/timm/barelogic\"\u003e\u003cimg src=\"https://img.shields.io/badge/GitHub-src-yellow?logo=github\u0026style=flat-square\"\u003e\u003c/a\u003e \n\u003cimg alt=\"language\" src=\"https://img.shields.io/badge/language-python-blue.svg?logo=python\u0026logoColor=white\u0026style=flat-square\"\u003e \n\u003ca href=\"https://github.com/timm/barelogic/blob/main/LICENSE.md\"\u003e\u003cimg alt=\"license\" src=\"https://img.shields.io/badge/license-MIT-brightgreen?logo=open-source-initiative\u0026logoColor=white\u0026style=flat-square\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/timm/barelogic/blob/main/README.md\"\u003e\u003cimg alt=\"docs\" src=\"https://img.shields.io/badge/docs-available-orange?logo=readthedocs\u0026logoColor=white\u0026style=flat-square\"\u003e\u003c/a\u003e\n\u003ca href=\"http://github.com/timm/barelogic/issues\"\u003e\u003cimg alt=\"issues\" src=\"https://img.shields.io/badge/issues-track-red?logo=github\u0026style=flat-square\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\nWhy BareLogic? Why reinvent a minimal version of useful AI tools?\n\nWell, lets ask \n[Richard Hipp](https://corecursive.com/066-sqlite-with-richard-hipp/)\nthe author SQLite, \nwho is famous for (re)building the tools he  uses day to day.\n\n\u003cimg src=\"/docs/img/backpack.png\" align=right width=300\u003e \n\n \u003e  \"People go backpacking,\n long hikes, where they carry\n everything they need on their back and they talk about how freeing\n that is because they are taking care of themselves.\"\n\n\n\u003e \"You’re not dependent on different vendors providing you something. Suppose I had elected to go with Berkeley DB as the storage engine for SQLite version two.\nWell, at that time Berkeley DB was open source, but then later it was sold off to Oracle, and it became a duel source proprietary model and you can’t get hold of the source code to the later versions without paying license fees, yada, yada, yada, so, suddenly it becomes a problem.\"\n\n\n\n\u003e  \"... (Pack backing)  **involves doing without**. ....\nWhenever a politician comes to you and says, “Oh, we’re\ngoing to take care of this problem for you.” What they’re really\nsaying is, we’re going to take away some of your freedoms. The\nexercise for you, here, is to figure out what freedoms they’re going\nto take away in order to solve this problem, and they’re often\nwell-disguised, but yeah, if you want to be free, that means doing\nthings yourself.\"\n\nIt turns out that \"doing without\" is an important principles:\n\n- William of Occum warned that\n _\"Frustra fit per plura quod potest fieri per pauciora\"_  (It is futile to do with more things that which can be done with fewer).\n- Aristotle told us _\"Ἡ φύσις τῇ ἐλαχίστῃ ὁδῷ ἐργάζεται\"_ (Nature operates in the shortest way possible). And the maths supports him.\n- Consider the space of systems all around us that have stood the test of time.\n  Mathematically, it is more like that those surviving things are less complex.\n  Nature optimizes towards some goal (e.g.  Survival) and that means \n  it must test  many different ways of doing things. \n  Simpler ways (with less decisions) are more likely to \n      apply to more future similar problems\n      (because \"similarity\" means checking for fewer things) [^apply].\n  Also, simpler things are easier to test if, for no other reason,\n      it will be easier to find or make repeated similar events (again, since the fewer the\n      choices, the easier it to find something like those choices)\n  On the other hand, more complex ways (that rely on more decisions ) struggle to\n  generalize because any two decisions, even those from some same class, tend to be further  apart [^dist].\n\n[^apply]: In Euclidean geometry, decisions partition space into\nregions. Simpler methods, with fewer decisions, create larger\nregions, covering more cases (past and present and future). \n\n[^dist]: As dimensions increase, distances between points **cannot decrease** and generally **increase**;\ni.e. items are further apart in higher dimensions. \nConsider two points in an n-dimensional space:\n     `A = (x₁, x₂, ..., xₙ)` and  `B = (y₁, y₂, ..., yₙ)`\nThe Euclidean distance between them is\n`dₙ = sqrt((x₁ - y₁)² + (x₂ - y₂)² + ... + (xₙ - yₙ)²)`.\nIf we extend these points into (n+1)-dimensional space by adding new coordinates xₙ₊₁ and yₙ₊₁, the distance becomes:\n`dₙ₊₁ = sqrt((x₁ - y₁)² + (x₂ - y₂)² + ... + (xₙ - yₙ)² + (xₙ₊₁ - yₙ₊₁)²)`.\nSince (xₙ₊₁ - yₙ₊₁)² is always non-negative, we get:\n`dₙ₊₁ ≥ dₙ`.  Q.E.D.\n\n\n\nIs all that too long-winded for you? Well how about:\n\n\u003cimg src=\"/docs/img/song.png\" align=right width=300\u003e \n\n\u003e _\"La perfection est atteinte, non pas lorsqu’il n’y a plus rien à ajouter, mais lorsqu’il n’y a plus rien à enlever.\"_\n(Perfection is achieved, not when there is nothing more to add, but when there is nothing \nleft to take away.)\u003cbr\u003e\n― Antoine de Saint-Exupéry, Airman's Odyssey\n\n\n\"Taking away\" things is another important\nprinciple. In his book [Empirical Methods for AI](https://www.eecs.harvard.edu/cs286r/courses/spring08/reading6/CohenTutorial.pdf), \nWilliam Cohen argues that\nsupposedly sophisticated methods should be benchmarked\nagainst seemingly stupider ones (the so-called “straw man”\napproach). I can attest that when ever I checked a supposedly sophisticated method against\na simpler one, there was always something useful in the\nsimpler. More often than not, a year later, I had\nswitched to the simpler approach.\n\nSo take every you know about AI. Then see what you can \"do without\"\nand what can you can \"take away\".\nRepeat that for decades of AI programming,\n and will be on your way to building  your  own BareLogic.\n\nAnd if you can't wait for decades, you could just look over my stuff.\nShare and enjoy [^hhgth].\n\n\n[^hhgth]: From the Hitchhikers Guide to the Galaxy by Douglas Adams. “'Share and Enjoy' is the company motto of the hugely successful Sirius Cybernetics Corporation Complaints Division, which now covers the major land masses of three medium-sized planets and is the only part of the Corporation to have shown a consistent profit in recent years. The motto stands-- or rather stood-- in three mile high illuminated letters near the Complaints Department spaceport on Eadrax. Unfortunately its weight was such that shortly after it was erected, the ground beneath the letters caved in and they dropped for nearly half their length through the offices of many talented young Complaints executives-- now deceased. The protruding upper halves of the letters now appear, in the local language, to read 'Go stick your head in a pig,' and are no longer illuminated, except at times of special celebration.”\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimm%2Fbarelogic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimm%2Fbarelogic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimm%2Fbarelogic/lists"}