Absolutely, have been for decades, see expert systems: https://en.m.wikipedia.org/wiki/Expert_system (I take the strong position that code is data, so an if statement in code is equivalent to an if-then rule stored in a database: it is just a different way of storing the data. However others would take a different position on that.)
The issue is that encoding human knowledge in if statements is hard to scale, so it doesn’t seem to be on the path to general artificial intelligence, but fundamentally it is still automation of cognition.
There is proposed EU legislation that (at least when I looked at it a few months ago) explicitly defines expert systems as for regulatory purposes.
> The issue is that encoding human knowledge in if statements is hard to scale, so it doesn’t seem to be on the path to general artificial intelligence, but fundamentally it is still automation of cognition.
If so, then so are many things that automate what people do or know. Its getting very close to saying if statements are AI at least in some cases. If I ask a client what we should do at a particular step of a process, then code their response as an if statement, is that "automation of cognition"?
Expert systems are somewhat different from simple if statements because they infer from data - the steps are not rigidly defined. However they do have some advantages over things like LLMs for many purposes: they can be analysed/understood and are predictable. I would far prefer to use something something like a medical diagnostic system that used an expert system rather than an LLM.
My first paid job was a prototype expert system, and after a few weeks work it was doing a fairly simple industrial diagnostic task pretty reliably and it did lead to a production version that was used for many years.
> I take the strong position that code is data, so an if statement in code is equivalent to an if-then rule stored in a database
One difference is that in a pure ES, the specific rules (if-then statement) to fire are selected at run time by the rule engine based on whether a rule's preconditions are triggered by items in the current 'blackboard'. This differs from a conventional imperative language where the possible sequence of if-then 'firings' is fixed and determined by their sequential position in the source code, even if the subset of actual firings depends on the program's state. In rule-based systems, it doesn't always follow that the sequence of rule firings relates in any way to their position in the source. Forcing rules to fire in a specific order sometimes involved painful shenanigans, rule prioritisation, etc.
I share your view. I also go past it, seeing most of the beneficial aspects of data science and AI as key blocks to building better, incrementally adaptive systems that simplify distribution of goods and services.