You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -16,6 +16,114 @@ This is the class library based on PDDL intellection and in effect it's a implem
16
16
17
17
One can to use previously defined classes which are using in other part of one's programm. At this version library can return the plan of doing and execute it to realize the goal. Examples of problems possible to solution by this algorithm:
18
18
19
+
<details>
20
+
<summary>Peg solitaire</summary>
21
+
22
+
Treatment the game: [wiki](https://en.wikipedia.org/wiki/Peg_solitaire)
23
+
24
+
In this example used triangular, 15-holes variant as easiest to solve.
25
+
26
+
Due to shape of game board it needs to use 3 possible action of jump. One of it, the horizontal move is shown below:
SharpPDDL : Divide in half determined!!! Total Cost: 22
306
-
Decant water: from 8-liter jug to the 5-liter jug. Action cost: 5
307
-
Decant water: from 5-liter jug to the 3-liter jug. Action cost: 3
308
-
Decant water: from 3-liter jug to the 8-liter jug. Action cost: 3
309
-
Decant water: from 5-liter jug to the 3-liter jug. Action cost: 2
310
-
Decant water: from 8-liter jug to the 5-liter jug. Action cost: 5
311
-
Decant water: from 5-liter jug to the 3-liter jug. Action cost: 1
312
-
Decant water: from 3-liter jug to the 8-liter jug. Action cost: 3
313
-
all states generated
314
-
```
315
-
</details>
316
-
317
303
<details>
318
304
<summary>Travelling salesman problem</summary>
319
305
@@ -381,8 +367,55 @@ Travel: Go to Kraków. Action cost: 304
381
367
Travel: Go to Koszalin. Action cost: 700
382
368
```
383
369
384
-
Make you sure about the solution with another program: [AtoZmath.com](https://cbom.atozmath.com/CBOM/Assignment.aspx?q=tsnn&q1=0%2C245%2C700%2C372%2C250%2C520%2C687%3B245%2C0%2C456%2C165%2C48%2C293%2C448%3B700%2C456%2C0%2C364%2C458%2C290%2C304%3B372%2C165%2C364%2C0%2C227%2C109%2C295%3B250%2C48%2C458%2C227%2C0%2C311%2C478%3B520%2C293%2C290%2C109%2C311%2C0%2C173%3B687%2C448%2C304%2C295%2C478%2C173%2C0%60MIN%60Koszalin%2CGniezno%2CKrak%C3%B3w%2CP%C5%82ock%2CPozna%C5%84%2CWarszawa%2CLublin%60Koszalin%2CGniezno%2CKrak%C3%B3w%2CP%C5%82ock%2CPozna%C5%84%2CWarszawa%2CLublin%60false%60false&do=1#tblSolution)
370
+
You can make you sure about the solution with another program: [AtoZmath.com](https://cbom.atozmath.com/CBOM/Assignment.aspx?q=tsnn&q1=0%2C245%2C700%2C372%2C250%2C520%2C687%3B245%2C0%2C456%2C165%2C48%2C293%2C448%3B700%2C456%2C0%2C364%2C458%2C290%2C304%3B372%2C165%2C364%2C0%2C227%2C109%2C295%3B250%2C48%2C458%2C227%2C0%2C311%2C478%3B520%2C293%2C290%2C109%2C311%2C0%2C173%3B687%2C448%2C304%2C295%2C478%2C173%2C0%60MIN%60Koszalin%2CGniezno%2CKrak%C3%B3w%2CP%C5%82ock%2CPozna%C5%84%2CWarszawa%2CLublin%60Koszalin%2CGniezno%2CKrak%C3%B3w%2CP%C5%82ock%2CPozna%C5%84%2CWarszawa%2CLublin%60false%60false&do=1#tblSolution)
371
+
372
+
</details>
385
373
374
+
<details>
375
+
<summary>Water pouring puzzle</summary>
376
+
377
+
Treatment the puzzle: [wiki](https://en.wikipedia.org/wiki/Water_pouring_puzzle)
378
+
379
+
```cs
380
+
publicclassWaterJug
381
+
{
382
+
publicreadonlyfloatCapacity;
383
+
publicfloatflood;
384
+
⁝
385
+
}
386
+
```
387
+
```cs
388
+
DomeinPDDLDecantingDomein=newDomeinPDDL("Decanting problems"); //In this problem...
389
+
390
+
ActionPDDLDecantWater=newActionPDDL("Decant water"); //...you need one action with 2 arguments:
391
+
WaterJugSourceJug=null; //The jug from which you pour,
392
+
WaterJugDestinationJug=null; // and the jug you pour into.
393
+
394
+
DecantWater.AddPartOfActionSententia(refSourceJug, "from {0}-liter jug ", SJ=>SJ.Capacity);
395
+
DecantWater.AddPartOfActionSententia(refDestinationJug, "to the {0}-liter jug.", DJ=>DJ.Capacity);
396
+
397
+
//In the effect of decanting the level in the jug from which you pour is maked smaller after that,...
0 commit comments