{"id":2804,"date":"2022-05-15T08:42:23","date_gmt":"2022-05-15T03:12:23","guid":{"rendered":"https:\/\/www.rangakrish.com\/?p=2804"},"modified":"2022-05-15T08:42:23","modified_gmt":"2022-05-15T03:12:23","slug":"students-assessment-advisor-in-prolog","status":"publish","type":"post","link":"https:\/\/www.rangakrish.com\/index.php\/2022\/05\/15\/students-assessment-advisor-in-prolog\/","title":{"rendered":"Students Assessment Advisor in Prolog"},"content":{"rendered":"<p>A close relative of mine teaches Maths to school students in different Grades. During a casual chat some time ago, he mentioned that he was trying to adopt an automated approach to selecting assignment problems based on each student&#8217;s performance so far. Obviously, there are many ways in which this can be done, but he outlined one approach that he felt would be effective for him.<\/p>\n<p>The basic idea is to come up with a hierarchy of <em><strong>&#8220;Concepts&#8221;<\/strong><\/em> (or core <em><strong>Topics<\/strong><\/em>) in Mathematics, and associate one such concept with each problem given to the students to solve. The hierarchy models <em><strong>&#8220;depends on<\/strong><\/em>&#8221; relationship showing how a concept <em><strong>&#8220;depends on&#8221;<\/strong><\/em> one or more other concepts. Thus, each problem attempted by a student would be directly or indirectly associated with one or more concepts. When students submit their assigments or exam papers, depending on the correct\/incorrect answers, it is possible to automatically infer which concepts need strengthening, and accordingly, which problems they should practise in future. A practical approach indeed.<\/p>\n<p>Of course, the challenge here is to come up with a <em><strong>Concept<\/strong><\/em> hierarchy (in theory, multiple hierarchies are possible) and design problems to map to these concepts. This requires serious effort.<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p>In this article, I will show how this problem can be modelled in <em><strong>Prolog<\/strong><\/em>. Of course, I have simplified the model to convey the core idea instead of getting bogged down in too much of detail.<\/p>\n<p>Here is a simple (and partial) hierarchy:<\/p>\n<figure id=\"attachment_2805\" aria-describedby=\"caption-attachment-2805\" style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/Concept-Dependencies.jpg?ssl=1\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" data-attachment-id=\"2805\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2022\/05\/15\/students-assessment-advisor-in-prolog\/concept-dependencies\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/Concept-Dependencies.jpg\" data-orig-size=\"1122,480\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1652517330&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Concept Dependencies\" data-image-description=\"&lt;p&gt;Concept Dependencies&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Concept Dependencies&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/Concept-Dependencies-1024x438.jpg\" class=\"wp-image-2805\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/Concept-Dependencies.jpg?resize=550%2C235&#038;ssl=1\" alt=\"Concept Dependencies\" width=\"550\" height=\"235\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/Concept-Dependencies.jpg?resize=300%2C128&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/Concept-Dependencies.jpg?resize=1024%2C438&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/Concept-Dependencies.jpg?resize=768%2C329&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/Concept-Dependencies.jpg?w=1122&amp;ssl=1 1122w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><figcaption id=\"caption-attachment-2805\" class=\"wp-caption-text\"><strong>Concept Dependencies<\/strong><\/figcaption><\/figure>\n<p>The arrows depict <em><strong>&#8220;depends on&#8221;<\/strong><\/em> relationship. Thus, for example,<span class=\"Apple-converted-space\">\u00a0 <\/span>in order to understand the concept of <em><strong>&#8220;Triangle&#8221;<\/strong><\/em>, one must be familiar with the concepts of <em><strong>&#8220;Straight Line&#8221;<\/strong><\/em> and <em><strong>&#8220;Pythogoras Theorem&#8221;<\/strong><\/em>.<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p>As I hinted before, this specific hierarchy might be debatable, but in general, an acceptable hierarchy can be arrived at.<\/p>\n<p>How do we represent this model in <em><strong>Prolog<\/strong><\/em>? Here is what I have done:<\/p>\n<figure id=\"attachment_2806\" aria-describedby=\"caption-attachment-2806\" style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/knowledgebase.jpg?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"2806\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2022\/05\/15\/students-assessment-advisor-in-prolog\/knowledgebase\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/knowledgebase.jpg\" data-orig-size=\"747,596\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1652426669&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Modeling Concepts in Prolog\" data-image-description=\"&lt;p&gt;Modeling Concepts in Prolog&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Modeling Concepts in Prolog&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/knowledgebase.jpg\" class=\"wp-image-2806\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/knowledgebase.jpg?resize=550%2C439&#038;ssl=1\" alt=\"Modeling Concepts in Prolog\" width=\"550\" height=\"439\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/knowledgebase.jpg?resize=300%2C239&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/knowledgebase.jpg?w=747&amp;ssl=1 747w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><figcaption id=\"caption-attachment-2806\" class=\"wp-caption-text\"><strong>Modeling Concepts in Prolog<\/strong><\/figcaption><\/figure>\n<p>The first part in the above diagram captures the concepts hierarchy. The second part assumes the existence of different problems, each mapping directly to exactly one concept. For example, the problems <em><strong>&#8220;square-pblm1&#8221;<\/strong><\/em> and <em><strong>&#8220;square-pblm2&#8221;<\/strong><\/em> both test the concept of <em><strong>&#8220;square&#8221;<\/strong><\/em>.<\/p>\n<p>The following <em><strong>Prolog<\/strong><\/em> predicates show the core reasoning logic:<\/p>\n<figure id=\"attachment_2807\" aria-describedby=\"caption-attachment-2807\" style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/core1.jpg?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"2807\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2022\/05\/15\/students-assessment-advisor-in-prolog\/core1\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/core1.jpg\" data-orig-size=\"1024,932\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1652388298&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Reasoning in Prolog\" data-image-description=\"&lt;p&gt;Reasoning in Prolog&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Reasoning in Prolog&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/core1.jpg\" class=\"wp-image-2807\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/core1.jpg?resize=550%2C501&#038;ssl=1\" alt=\"Reasoning in Prolog\" width=\"550\" height=\"501\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/core1.jpg?resize=300%2C273&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/core1.jpg?resize=768%2C699&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/core1.jpg?w=1024&amp;ssl=1 1024w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><figcaption id=\"caption-attachment-2807\" class=\"wp-caption-text\"><strong>Reasoning in Prolog<\/strong><\/figcaption><\/figure>\n<p>Consider the notion of a particular student being weak in a concept. This is how we represent it in <em><strong>Prolog<\/strong><\/em>:<\/p>\n<p style=\"padding-left: 40px;\"><span style=\"color: #0000ff;\"><em>A Student <strong>S<\/strong> is weak in a Concept <strong>C<\/strong> if:<\/em><\/span><\/p>\n<p style=\"padding-left: 40px;\"><span style=\"color: #0000ff;\"><em>a) There is a problem <strong>P<\/strong>\u00a0that tests the concept <strong>C<\/strong>\u00a0and <strong>S<\/strong>\u00a0has solved <strong>P<\/strong>\u00a0incorrectly<\/em><\/span><\/p>\n<p style=\"padding-left: 40px;\"><span style=\"color: #0000ff;\"><em>(OR)<\/em><\/span><\/p>\n<p style=\"padding-left: 40px;\"><span style=\"color: #0000ff;\"><em>b) The student <strong>S<\/strong> is known to be weak in a concept <strong>C1<\/strong> and the concept <strong>C<\/strong> depends on knowing concept <strong>C1<\/strong><\/em><\/span><\/p>\n<p>I hope you get the idea. The other predicates work similarly.<\/p>\n<p>How can we recommend a set of problems for a student based on what he has solved so far? That and related logic is shown below:<\/p>\n<figure id=\"attachment_2808\" aria-describedby=\"caption-attachment-2808\" style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/core2.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2808\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2022\/05\/15\/students-assessment-advisor-in-prolog\/core2\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/core2.jpg\" data-orig-size=\"1072,374\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1652384539&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Logic to Suggest Problems\" data-image-description=\"&lt;p&gt;Logic to Suggest Problems&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Logic to Suggest Problems&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/core2-1024x357.jpg\" class=\"wp-image-2808\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/core2.jpg?resize=550%2C192&#038;ssl=1\" alt=\"Logic to Suggest Problems\" width=\"550\" height=\"192\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/core2.jpg?resize=300%2C105&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/core2.jpg?resize=1024%2C357&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/core2.jpg?resize=768%2C268&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/core2.jpg?w=1072&amp;ssl=1 1072w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><figcaption id=\"caption-attachment-2808\" class=\"wp-caption-text\"><strong>Logic to Suggest Problems<\/strong><\/figcaption><\/figure>\n<p>I am sure you can understand the code above.<\/p>\n<p>After I completed the simple <em><strong>Prolog<\/strong><\/em> model, I decided to build a <em><strong>C#<\/strong><\/em>-based <em><strong>Win Forms<\/strong><\/em> application that can interact with the <em><strong>Prolog<\/strong><\/em> engine and provide a convenient UI to show how this works.<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p>Here is one screenshot from the application:<\/p>\n<figure id=\"attachment_2809\" aria-describedby=\"caption-attachment-2809\" style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/Ex1.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2809\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2022\/05\/15\/students-assessment-advisor-in-prolog\/ex1-4\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/Ex1.jpg\" data-orig-size=\"838,595\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1652426140&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Example Analysis\" data-image-description=\"&lt;p&gt;Example Analysis&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Example Analysis&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/Ex1.jpg\" class=\"wp-image-2809\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/Ex1.jpg?resize=550%2C391&#038;ssl=1\" alt=\"Example Analysis\" width=\"550\" height=\"391\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/Ex1.jpg?resize=300%2C213&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/Ex1.jpg?resize=768%2C545&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/Ex1.jpg?w=838&amp;ssl=1 838w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><figcaption id=\"caption-attachment-2809\" class=\"wp-caption-text\"><strong>Example Analysis<\/strong><\/figcaption><\/figure>\n<p>Here, a student by name <em><strong>&#8220;Diana&#8221;<\/strong><\/em> has solved the <em><strong>&#8220;statistics-pblm&#8221;<\/strong><\/em> correctly, but not the <em><strong>&#8220;probability-pblm&#8221;<\/strong><\/em>. Based on this, the system concludes that Diana is strong in <em><strong>&#8220;Statistics&#8221;<\/strong><\/em>, but is weak in <em><strong>&#8220;Probability&#8221;<\/strong><\/em> and <em><strong>&#8220;Bayes Theorem&#8221;<\/strong><\/em>, and suggests the student to solve <em><strong>&#8220;bayestheorem-pblm&#8221;<\/strong><\/em>. The reason why the system infers that <em><strong>&#8220;Diana&#8221;<\/strong><\/em> is weak in <em><strong>&#8220;Bayes Theorem&#8221;<\/strong><\/em> is because the latter depends on <em><strong>&#8220;Probability&#8221;<\/strong><\/em> and <em><strong>&#8220;Diana&#8221;<\/strong><\/em> is known to be weak in this topic.<\/p>\n<p>Here is another example:<\/p>\n<figure id=\"attachment_2810\" aria-describedby=\"caption-attachment-2810\" style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/Ex2.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2810\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2022\/05\/15\/students-assessment-advisor-in-prolog\/ex2-2\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/Ex2.jpg\" data-orig-size=\"838,595\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1652426337&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Another Example\" data-image-description=\"&lt;p&gt;Another Example&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Another Example&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/Ex2.jpg\" class=\"wp-image-2810\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/Ex2.jpg?resize=550%2C391&#038;ssl=1\" alt=\"Another Example\" width=\"550\" height=\"391\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/Ex2.jpg?resize=300%2C213&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/Ex2.jpg?resize=768%2C545&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/05\/Ex2.jpg?w=838&amp;ssl=1 838w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><figcaption id=\"caption-attachment-2810\" class=\"wp-caption-text\"><strong>Another Example<\/strong><\/figcaption><\/figure>\n<p>In the above case, <em><strong>&#8220;Square&#8221;<\/strong><\/em> is considered a weak concept for the student because, out of the two problems that exercise this concept, he got one right and the other wrong.<\/p>\n<p>I hope you can understand the approach I have taken to construct this model. To implement the idea completely requires considerable effort, but I am sure it is worth it.<\/p>\n<p>You can download my <em><strong>Prolog<\/strong><\/em> code from <a href=\"http:\/\/www.rangakrish.com\/downloads\/StudentAdvisor.pro\" target=\"_blank\" rel=\"noopener\"><em><strong>here<\/strong><\/em><\/a>. I used <a href=\"https:\/\/sicstus.sics.se\" target=\"_blank\" rel=\"noopener\"><em><strong>Sicstus Prolog 4.5.1<\/strong><\/em> <\/a>to implement the above.<\/p>\n<p>Have a nice weekend!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A close relative of mine teaches Maths to school students in different Grades. During a casual chat some time ago, he mentioned that he was trying to adopt an automated approach to selecting assignment problems based on each student&#8217;s performance so far. Obviously, there are many ways in which this can be done, but he [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[17,147],"tags":[322,148,321],"class_list":["post-2804","post","type-post","status-publish","format-standard","hentry","category-programming","category-prolog","tag-maths-concepts","tag-prolog","tag-student-assignment-checker"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9OLnF-Je","jetpack-related-posts":[{"id":3555,"url":"https:\/\/www.rangakrish.com\/index.php\/2024\/11\/22\/multiobjective-optimization-moo-in-lisp-and-prolog\/","url_meta":{"origin":2804,"position":0},"title":"Multiobjective Optimization (MOO) in Lisp and Prolog","author":"admin","date":"November 22, 2024","format":false,"excerpt":"Recently I came across a nice article\u00a0by Jose Crespo, where the author stresses that the future of programming revolves around the application of math concepts such as Functor, Monads, Folds, etc. In addition, he argues that familiarity with C\/C++ is essential in this modern AI age. The author goes through\u2026","rel":"","context":"In &quot;C++&quot;","block_context":{"text":"C++","link":"https:\/\/www.rangakrish.com\/index.php\/category\/c\/"},"img":{"alt_text":"Lisp Code for Pareto Front","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/11\/lisp-code-249x300.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":2922,"url":"https:\/\/www.rangakrish.com\/index.php\/2022\/10\/06\/why-learn-prolog\/","url_meta":{"origin":2804,"position":1},"title":"Why Learn Prolog?","author":"admin","date":"October 6, 2022","format":false,"excerpt":"There are several programming languages in use today and a simple google search will throw up interesting recommendations of a subset of these languages to learn, usually based on popularity ranking. As is expected, the popularity of a programming language varies over time and hence a language that was in\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.rangakrish.com\/index.php\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3260,"url":"https:\/\/www.rangakrish.com\/index.php\/2023\/11\/26\/generating-polynomials-in-prolog\/","url_meta":{"origin":2804,"position":2},"title":"Generating Polynomials in Prolog","author":"admin","date":"November 26, 2023","format":false,"excerpt":"Polynomial is an important topic in High School maths curriculum. There are many online courses that explain the topic in great details with lots of examples and sample exercises. Wouldn\u2019t it be interesting if we can generate polynomials of given degree programmatically? It turns out that this is not such\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.rangakrish.com\/index.php\/category\/programming\/"},"img":{"alt_text":"Generating Polynomials - Main Clauses","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2023\/11\/Code1-300x163.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2023\/11\/Code1-300x163.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2023\/11\/Code1-300x163.jpg?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":3573,"url":"https:\/\/www.rangakrish.com\/index.php\/2024\/12\/17\/using-prolog-to-solve-the-word-transformation-puzzle\/","url_meta":{"origin":2804,"position":3},"title":"Using Prolog to Solve the Word Transformation Puzzle","author":"admin","date":"December 17, 2024","format":false,"excerpt":"In today\u2019s article, I want to share an interesting word puzzle, and then show how to solve it in Prolog. Here is the puzzle: You are given two words of the same length. You have to transform the first word into the second word, by changing only one letter at\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.rangakrish.com\/index.php\/category\/programming\/"},"img":{"alt_text":"Our Dictionary","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/12\/prolog1-300x280.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1650,"url":"https:\/\/www.rangakrish.com\/index.php\/2019\/07\/21\/custom-text-analysis-using-textrazors-prolog-engine\/","url_meta":{"origin":2804,"position":4},"title":"Custom Text Analysis Using TextRazor\u2019s Prolog Engine","author":"admin","date":"July 21, 2019","format":false,"excerpt":"This is the third part in the series on information extraction from unstructured text. In the first part, we saw how MeaningCloud\u00a0allows us to specify complex rules to identify custom categories through their Deep Categorization API. The second part\u00a0covered spaCy\u2019s\u00a0pattern matcher. Today, I would like to discuss how we can\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"Result of Processed Case","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/07\/Output-1.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/07\/Output-1.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/07\/Output-1.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/07\/Output-1.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":1659,"url":"https:\/\/www.rangakrish.com\/index.php\/2019\/08\/04\/generating-poetry-in-prolog\/","url_meta":{"origin":2804,"position":5},"title":"Generating Poetry in Prolog","author":"admin","date":"August 4, 2019","format":false,"excerpt":"In an earlier article, I showed how we can generate poetry (with limitations, of course!) using my iLangGen framework. That implementation (in Lisp) made use of iLexicon, a large dictionary of English words, which I have been building over the years. I subsequently ported iLexicon to Prolog and it now\u2026","rel":"","context":"In &quot;Natural Language Processing&quot;","block_context":{"text":"Natural Language Processing","link":"https:\/\/www.rangakrish.com\/index.php\/category\/natural-language-processing\/"},"img":{"alt_text":"Generation Logic","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/08\/Code3.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/08\/Code3.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/08\/Code3.jpg?resize=525%2C300&ssl=1 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/2804","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/comments?post=2804"}],"version-history":[{"count":0,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/2804\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/media?parent=2804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/categories?post=2804"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/tags?post=2804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}