Prolog, Computer Engineering

Assignment Help:

Prolog:

Still we can take our card game from the previous lecture like a case study for the implementation of a logic-based expert system. So there the rules were: four cards are laid on the table face up. Now Player 1 takes the first card, they take it in turns until they both have two cards each. And to see who has won, and they each add up their two card numbers, the winner is the one with the highest even number. So there the winner scores the even number they have. But see if there's no even number, and both players achieve the same even number, so then the game is drawn. Than it could be argued that undertaking a minimax search is a little avoidable for this game, this means that we could easily simplified a set of rules for each player, and so that they choose cards rationally. Just to demonstrate this, there we will derive down some Prolog rules that specify how player one should choose the first card.

For more understand we see example, assume there the cards dealt were as: 4, 5, 6, 10. So now in this case, there the best choice of action for player one is to choose the 10, and followed presumably by the 4, hence player two will pick the 6. After that we need to abstract from this particular example to the general case as: we see such there were three even numbers or one odd one, and according that player one is guaranteed another even number to match the one they chose for match.


Related Discussions:- Prolog

How are devices represented in unix, How are devices represented in UNIX? ...

How are devices represented in UNIX? All devices are shown by files called special files that are located in /dev directory. Therefore, device files and other files are named a

Create a factory function and constructor, 1) This project will use an acco...

1) This project will use an account class that has the members: string account_code; string first_name; string last_name; double balance; Provide a constructor that

No class can derive, Make a console application. Add class 'Account' having...

Make a console application. Add class 'Account' having variables as num (integer) name (String), bal (double), ac_code (byte). Describe four different constructors to initialize th

Explain processing of an interrupt, Q. Explain Processing of an Interrupt? ...

Q. Explain Processing of an Interrupt? The interrupt is processed as: Step 1: Number field in INT instruction is multiplied by 4 to get its entry in interrupt vector table.

How to execute an instruction, Execution: Now instruction is ready for exec...

Execution: Now instruction is ready for execution. A different opcode will need different sequence of steps for execution. Hence let's discuss a few illustrations of execution of s

Determine the boolean expression using k-map, Reduce the following equation...

Reduce the following equation using k-map Y = BC‾D‾ + A‾BC‾D + ABC‾D + A‾BCD + ABCD Ans. Multiplying the first term with (A+A') Y = A'BC'D' + ABC'D' + A'BC'D + ABC'D + A'BCD +

Determine the disadvantages of fact finding, Determine the Disadvantages of...

Determine the Disadvantages of fact finding -  People are usually uncomfortable being watched and may work in a different way -  What they are watching may not be represent

Derivatives and applications of derivatives, What can you say about the exi...

What can you say about the existence of a stationary point in the interval [ 1; 3] for the function f (x) = x 2 2x 3.

Passing parameters through stack, Q. Passing Parameters through Stack? ...

Q. Passing Parameters through Stack? The best scheme for parameter passing is through stack. It is also a standard scheme for passing parameters when assembly language is inter

Convert ascii code to its bcd equivalent, Convert ASCII code to its BCD equ...

Convert ASCII code to its BCD equivalent. This can be achieved by simply replacing bits in upper four bits of byte by four zeros. For illustration the ASCII '1' is 32h = 0010B. By

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd