Sorry, no tutorial handy ... i only have the full code, which i don't want
to publish ...

But Prolog, same as *pilog* is a declarative language, very easy to learn.
What makes pilog unique is, that you can mix it with Lisp.

It's a relatively simple combinatorial problem, that can be divided into
two (well, four) separate problems:

1st: Find the right, matching boxes to fulfill your 'special' customer's
demands.

2nd: With the rest of fruits you let pilog reason about, what 'standard
packages' can be rebuilt from that.

3rd. Delete boxes from problem #1 from your inventory (PicoLisp)

4th. Add rebuilt boxes to inventory. There might be some fruits left over.
(PicoLisp)

Now your homework! ;-)

Of course, you can implement it with pure Lisp, too! ;-)

Have fun!

Am Mittwoch, 6. Mai 2020 schrieb cilz <cilz...@cilzone.fr>:
> Hi Guido,
>
> I would love to see some (toy?) code example about this if you have
some...
>
> Thanks in advance, best,
>
> Eric
>
> Le 06/05/2020 à 09:27, Guido Stepken a écrit :
>>
>> You all might have heard about 'pilog' a Prolog like AI system within
Picolisp, where you can define rules, describe a situation and ask for
solutions. What can you do with that?
>>
>> Typically, items come bundled in all kinds of packages, repair packages,
addons, ...
>>
>> E.g. We have 30 (all slighly different) meal packages in stock with each
(banana, apple, pear), (cherry, strayberry, apple), (strawberry, banana,
orange) ...
>>
>> All packages having a serial number, only available as complete package,
'all or nothing' - rule.
>>
>> Business, so far, went well. But now we have good customer, ordering 3
packages: (2x banana, 1 apple), (3 x strawberry), (1 orange,2 apples).
>>
>> Now comes the question: What is the minimum number of precustomized
packages i do have to destroy and unlist from the database and how can i
repackage the rest to fit the scheme of custom packages, (re-)adding some
'new' packages (while reusing using old boxes)?
>>
>> No problem for PicoLisp Pilog. You don't even have to program that.
Simply give PicoLisp the rules, and let Pilog reason about it
>>
>> And you even don't have to download all inventory into a Picolisp to
find the perfect solution: ***Picolip Prolog is sitting in the
database!!!***
>>
>> I did implement that for a couple of hundred 'service points' for a huge
manufacturer. Using Picolisp's built-in distributed database cluster. Now
Pilog even can reason across several locations and their local inventory,
saving them *incredible amounts* of money.
>>
>> Of course, they had to learn howto rewrite their rules that change from
day to day. Sometimes there is 'norule' day, e.g. when there is no personel
available to repackage boxes. Pilog then recognizes that and does not
reason across whole cluster database any longer.
>>
>> Picolisp is unbeatable in logistics, far ahead of *any* competitor, for
*any* money. At ZERO cost!!! This little thing is a *genius strike*!
>>
>> Have fun!
>>
>> Best regards, Guido Stepken
>>
>>
>>
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>

Reply via email to