{"id":505,"date":"2025-02-05T17:34:35","date_gmt":"2025-02-05T12:04:35","guid":{"rendered":"https:\/\/www.amitysoft.com\/blog\/?p=505"},"modified":"2025-02-05T17:37:09","modified_gmt":"2025-02-05T12:07:09","slug":"demystifying-ai-algorithms-part-1","status":"publish","type":"post","link":"https:\/\/www.amitysoft.com\/blog\/demystifying-ai-algorithms-part-1\/","title":{"rendered":"Demystifying AI algorithms: Part &#8211; I"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-506\" src=\"https:\/\/www.amitysoft.com\/blog\/wp-content\/uploads\/2025\/02\/Demystifying-AI-algorithms-1024x576.png\" alt=\"Demystifying AI algorithms\" width=\"1024\" height=\"576\" \/><\/p>\n<p><b>Rules Rule &#8211; GOFAI<\/b><\/p>\n<p><span style=\"font-weight: 400;\">In this series of articles, I would like to discuss the basic nature of categories of AI\/ML algorithms and develop a common-sense perspective of the algorithms and their applications consciously not getting deeply into technical aspects as well as deal with those applications explicitly which touch our business and personal lives. In this first part I will bring out perspectives on so called \u2018Good Old Fashioned Artificial intelligence (GOFAI)\u2019<\/span><\/p>\n<p><b>The thumb of Old-fashioned<\/b><\/p>\n<p><span style=\"font-weight: 400;\">We will start from where it all started and tell you what is now referred to as \u2018Good Old Fashioned Artificial intelligence (GOFAI) which was prominent during mid-1950s to mid-1990s is still relevant. Not that all young people ignore elderly old-fashioned people. Trying to mimic experts was the earliest approach to install intelligence in machines. Rules and thumb rules of experts get processed through their knowledge base to come out with answers for questions which often surprised the ordinary souls.\u00a0<\/span><\/p>\n<p><b>How Rules rule?<\/b><\/p>\n<p><span style=\"font-weight: 400;\">In this approach knowledge is represented symbolically, and logical rules framed to simulate human intelligence. Knowledge can also be coded into rules and represented as trees which can be searched. Inverse deduction is one of the methods used to arrive at a result based on available conclusions. To get a feel of how GOFAI algorithms work lets take up a simple rule set and its implementation in prolog.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">From the conclusions or data such as <\/span><i><span style=\"font-weight: 400;\">\u2018Cow eats grass\u2019, \u2018Sheep eats grass\u2019, \u2018Horse eats horse grams\u2019, \u2018Grass is plant material\u2019, \u2018Horse grams is plant material\u2019, \u2018Herbivores eat plant material<\/span><\/i><span style=\"font-weight: 400;\">\u2019, a general concept or result that <\/span><i><span style=\"font-weight: 400;\">\u2018Horse is herbivores\u2019<\/span><\/i><span style=\"font-weight: 400;\"> can be arrived at. The below prolog program can answer whether cow is a herbivore and lion is a carnivore.<\/span><\/p>\n<p>% Facts<br \/>\neats(cow, grass).<br \/>\neats(sheep, grass).<br \/>\neats(horse, horse_grams).<br \/>\neats(deer, grass).<br \/>\neats(lion, deer).<br \/>\nis_plant_material(grass).<br \/>\nis_plant_material(horse_grams).<br \/>\nis_animal_material(deer).<br \/>\n% Rule: Herbivores eat plant material<br \/>\nherbivore(X) :- eats(X, Y), is_plant_material(Y).<br \/>\n% Rule: Carnivores eat animal material<br \/>\ncarnivore(X) :- eats(X, Y), is_animal_material(Y).<br \/>\n% Query: Is Horse a herbivore?<br \/>\n?- herbivore(horse).<br \/>\n% Query: Is Lion a carnivore?<br \/>\n?- carnivore(lion).<br \/>\n% Query: Is Horse a herbivore?<br \/>\n?- herbivore(horse).<\/p>\n<p><span style=\"font-weight: 400;\">Prolog program<\/span><\/p>\n<p><span style=\"font-weight: 400;\">We define the facts about what each animal eats and that grass and horse grams are plant material. The rule herbivore(X) states that an animal X is a herbivore if it eats something (Y) that is plant material. Finally, we query whether \u201chorse\u201d satisfies the condition of being a herbivore.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">When we run this Prolog program, it will deduce that \u201cHorse is Herbivores\u201d based on the given data.\u00a0 Unlike the imperative programming languages such as python or Java where we explicitly specify control flow using <\/span><i><span style=\"font-weight: 400;\">if-then-else<\/span><\/i><span style=\"font-weight: 400;\"> statements,\u00a0 Prolog is a declarative language where we specify\u00a0<\/span><b>what<\/b><span style=\"font-weight: 400;\">\u00a0we want to achieve rather than\u00a0<\/span><b>how<\/b><span style=\"font-weight: 400;\">\u00a0to achieve it. Programs in Prolog consist of a set of\u00a0<\/span><b>facts<\/b><span style=\"font-weight: 400;\">\u00a0(statements about the world) and\u00a0<\/span><b>rules<\/b><span style=\"font-weight: 400;\">\u00a0(logical relationships). Prolog\u2019s execution model is based on\u00a0<\/span><b>resolution<\/b><span style=\"font-weight: 400;\">, which involves searching for solutions by unifying facts and rules.<\/span><\/p>\n<p><b>Did GOFAI leave its mark?<\/b><\/p>\n<p><span style=\"font-weight: 400;\">GOFAI is well-suited for building expert systems that emulate human expertise in specific domains. Examples include medical diagnosis, legal reasoning, financial advice, and troubleshooting complex machinery. MYCIN was an early expert system developed in the 1970s by Edward Shortliffe at Stanford University. Its primary purpose was to assist doctors in diagnosing and recommending treatments for patients with blood diseases, particularly bacterial infections.<\/span><\/p>\n<p><b>Limitations of GOFAI<\/b><\/p>\n<p><span style=\"font-weight: 400;\">There are several notable limitations that have influenced the shift towards other AI approaches like machine learning and neural networks. Here are some key limitations:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">They lack the flexibility to adapt to new or unexpected scenarios.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">GOFAI systems do not learn from experience.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">The challenge of connecting abstract symbols to real-world objects and experiences (known as symbolic grounding problem) makes it difficult for these systems to understand and interact with the world in a meaningful way.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u00a0As the complexity of the problem domain increases, the number of rules and symbols required can grow exponentially, making the system difficult to manage and scale<\/span><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">GOFAI systems are not well-suited for dealing with uncertainty and probabilistic reasoning.\u00a0<\/span><\/li>\n<\/ol>\n<p><b>Why should we get along with this old-fashioned guy?<\/b><\/p>\n<p><span style=\"font-weight: 400;\">GOFAI provides a foundational understanding of AI principles and techniques. It is still taught in AI courses to help students grasp the basics of symbolic reasoning and logic. You may wonder the relevance of this old fashioned fellow in the current AI world where we hear a lot about LLMs like ChatGPT.\u00a0<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">GOFAI systems are often more transparent and easier to understand compared to complex machine learning models. This makes them valuable in applications where explainability is crucial, such as legal and medical decision-making.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Many industries still rely on rule-based systems for tasks like business process automation, compliance checking, and expert systems. These systems benefit from the structured and deterministic nature of GOFAI.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Modern AI often integrates GOFAI principles with machine learning techniques to create hybrid systems. For example, combining symbolic reasoning with neural networks can enhance the interpretability and robustness of AI models.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">GOFAI\u2019s methods for knowledge representation, such as semantic networks and ontologies, are still used in fields like natural language processing and information retrieval.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">I have pointed out how the AI world is taking a leap back to GOFAI\u00a0 in my earlier blog \u2013 \u2018Back to basics: Machine Learning for Human Understanding ( <\/span><a href=\"http:\/\/ai-positive.com\/2024\/05\/30\/back-to-basics-machine-learning-for-human-understanding\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">http:\/\/ai-positive.com\/2024\/05\/30\/back-to-basics-machine-learning-for-human-understanding\/<\/span><\/a><span style=\"font-weight: 400;\"> ). I will also discuss in future how the GOFAI concepts (if not the technology) can be used to make sense of the jungle of models and algorithms prevalent in AI.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Word press AI Feedback<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The content provides a thorough overview of the Good Old Fashioned Artificial Intelligence (GOFAI), explaining its significance, limitations, and relevance in the current AI landscape. It effectively communicates the concepts and applications of GOFAI, making it informative for readers seeking to understand its fundamental principles.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Actions to consider:<\/span><\/p>\n<ol>\n<li><span style=\"font-weight: 400;\"> Consider breaking down complex sentences for easier comprehension.<\/span><\/li>\n<li><span style=\"font-weight: 400;\"> Provide more specific examples or case studies to illustrate the practical applications of GOFAI.<\/span><\/li>\n<li><span style=\"font-weight: 400;\"> Include visuals or diagrams to enhance the understanding of symbolic reasoning and logic for readers.<\/span><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Rules Rule &#8211; GOFAI In this series of articles, I would like to discuss the basic nature of categories of AI\/ML algorithms and develop a common-sense perspective of the algorithms and their applications consciously not getting deeply into technical aspects as well as deal with those applications explicitly which touch our business and personal lives&#8230;.<\/p>\n","protected":false},"author":1,"featured_media":506,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"default","_kad_post_title":"default","_kad_post_layout":"default","_kad_post_sidebar_id":"","_kad_post_content_style":"default","_kad_post_vertical_padding":"default","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[114],"tags":[115],"class_list":["post-505","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","tag-demystifying-ai-algorithms"],"_links":{"self":[{"href":"https:\/\/www.amitysoft.com\/blog\/wp-json\/wp\/v2\/posts\/505","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.amitysoft.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.amitysoft.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.amitysoft.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.amitysoft.com\/blog\/wp-json\/wp\/v2\/comments?post=505"}],"version-history":[{"count":1,"href":"https:\/\/www.amitysoft.com\/blog\/wp-json\/wp\/v2\/posts\/505\/revisions"}],"predecessor-version":[{"id":507,"href":"https:\/\/www.amitysoft.com\/blog\/wp-json\/wp\/v2\/posts\/505\/revisions\/507"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.amitysoft.com\/blog\/wp-json\/wp\/v2\/media\/506"}],"wp:attachment":[{"href":"https:\/\/www.amitysoft.com\/blog\/wp-json\/wp\/v2\/media?parent=505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.amitysoft.com\/blog\/wp-json\/wp\/v2\/categories?post=505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.amitysoft.com\/blog\/wp-json\/wp\/v2\/tags?post=505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}