Posts

Unpacking AI's Future: Insights from Stanford's Lecture Series with Eric Schmidt

In the ever-evolving world of technology, many of us are striving to make sense of artificial intelligence (AI)—a field that is rapidly reshaping industries and economies. While grasping the technical aspects of AI is one challenge, understanding its broader implications on the economy and by extension to our daily lifes is another. This is where expert insights coming from politicians, researchers, or economic leaders become invaluable. A standout resource for anyone interested in AI's impact on the economy is Stanford University's lecture series, "The Age of AI" (ECON295/CS323). This series offers a deep dive into the intersection of AI and economic trends, providing a nuanced view of what the future might hold. At this point the series has just been made available, while it seemingly started earlier in the year. The second lecture features Eric Schmidt, former CEO of Google. Schmidt brings a wealth of experience to the table, sharing his perspective on the curren...

Logtalk - Hello World

According to the SWI-Prolog Mailing List, ... Logtalk is an object-oriented logic programming language that can use most Prolog implementations as a back-end compiler. As a multi-paradigm language, it includes support for both prototypes and classes, protocols (interfaces), component-based programming through category-based composition, event-driven programming, and high-level multi-threading programming. For this, it seems worth trying Logtalk in order to lift Prolog programming to a different level (more contained). As usually, the first program show-casing some programming language is the famous "hello world" program. Unlike, other programming languages the Prolog version of "hello world" is a family relation. Since this post is merely to maintain flow, I will present a "hello world" in Logtalk. Logtalk helps decomposing program logic by offering the well known concept of object and interface (including visibility of object members). Behold .. the magic...

Prolog – Mindstorms (I)

The last friday, I received my Lego Mindstorms NXT 2.0 – THANKS! Unfortunately, I lack the necessary power supply in form of 6AA batteries. Clearly, I went to my favorite retailer – Amazon – and ordered a couple of rechargeable ones (including the recharger). Since my mind is somehow attached to Prolog, I asked myself would it be possible to do the mind-storming in Prolog … so I fired up the information retrieval engine of the day … and hit: [English] New Mexico State University: Building and Programming Robots http://www.cs.nmsu.edu/~tson/classes/fall03-579/schedule.htm [German] University of Potsdam: Programmieren in Prolog http://www.cs.uni-potsdam.de/wv/03SS/aktuell.html#SECTION00051000000000000000 [German] Toni Gläser: LEGOLOG - Lego Mindstorms und ein Golog-Planer Eine Einführung und ein Überblick über das Konzept und die Programmierung sowie die Implementation von Aufgaben für den Roboter http://www.kbs.uni-hannover.de/~brase/...

Adventures In Prolog - General Reading (2)

Since I have not posted anything for while, I thought I keep the flow running, by pointing to Boehm's "Document Analysis Experiment" - applied NLP using Prolog. Taken from the Overview section: The main purpose of this document analysis program is to count the number of useful words in the document in various ways, and to use NLP to (hopefully) improve the analysis. You may find his project useful and interesting - so happy reading.

Adventures In Prolog - ProjectEuler20

Continuing with the Euler Quest, a simple and straight-forward solution to Project Euler's problem 20 is presented. The problem statement reads: Find the sum of the digits in the number 100! Where ! denotes the faculty operator. One (simple) way to solve the problem goes as follows: Firstly, calculate the value of 100!. Secondly, convert the value into a list of digits. Thirdly, sum each digit. Lastly, output the cumulative result. A translation of this solution may read like: euler_20_1(F, Out) :- fac(F, Fac), string_to_list(Fac, CList), euler_20_1_t(CList, 0, Out), !. euler_20_1_t([], Current, Current). euler_20_1_t([X|Y], Current, Out) :- number_chars(N, [X]), NewCurrent is Current + N, euler_20_1_t(Y, NewCurrent, Out). The fac predicate computes the faculty of some positive integer number. string_to_list is a built-in predicate converting a string into its character list representation and number chars converts between ascii character code and number. Building only...

Adventures In Prolog - Euler7 and the Nth Prime

Building on our previous prime-related posts, today's post will cover a solution to Project Euler's 7th Problem, i.e. finding the 10001st prime. Now, the solution to this problem can be easily expressed in thought and then converted to some programming language … Starting with the lowest and first prime – 2 - , we check each subsequent number j > i, for primality. Whenever we find a j such that j is prime, we increment a prime counter c by one and continue testing numbers k > j. This is done until c reaches the number 10001. The Prolog code below is an expression of this idea, added with some prime numbers found during the process of finding the 10001st prime. This means, given the border of some prime interval, i.e. 100th prime = i and 200th prime = j, we may start looking for the 150th prime within the number interval [i,j], instead of starting at 2 and checking each number until the prime counter reaches 150. Also, we might have defined the euler_7 predicate to be dyna...

Adventures in Prolog - Some more Primes

Again, we are going to tackle some problems mentioned in the list of 99-Prolog problems. Today's post builds upon the gcd predicate defined last time to attack problems: P31 = is_prime P35 = prime_factors P36 = prime_factors_mult P39 = prime_list Now, building on the previously defined gcd predicate, on may define a prime inductively: a prime is a number which is only (divisible by one and itself) the smallest prime is 2 any number greater than 2 is either composite or prime Building on this definition we may translate the smallest prime into a Prolog predicate quite easily. To determine the primeness/composibility of any number greater than 2, one may use the gcd predicate. Recalling that a prime p is a number which cannot be divided by any number in ]1, p[, the following predicate may be given: is_prime(2) :- !. is_prime(3) :- !. is_prime(X) :- X >= 2, UpperBound is round(sqrt(X)) + 1, is_prime_t(X, 2, UpperBound), !. is_prime_t(_, UpperBound, UpperBound). is_prime_t(X, ...