A Guide to Artificial Intelligence with Visual Prolog. Addendum for Version 7.3
Written by Randall Scott
For both the Sample Program in the Book and the slightly enhanced version of the Sample Program provided by the Supplemental Package, you will need to do the following for the Programs to work with the new Visual Prolog version 7.3, if they were already constructed with version 7.2. If on the other hand, you start constructing them with the version 7.3, I don’t think you’ll encounter any problems. This sounds reasonable if you construct all the program yourself entirely, which should happen as you read the book and construct GAMegaLotto. However, this probably is not true regarding LottoV2 in the Supplemental Package.
- Copy all of the programs from their version 7.2 directories to new directories for version 7.3. Then delete all the ‘OBJ’ files from the ‘OBJ’ directory. Also delete all the files in the EXE directories except the ‘Stats.txt’, ‘ImportInstruction.hlp’, and the ‘MegaMillionsHistory.csv’ files.
- Assuming these Programs were constructed with Version 7.2, Open Visual Prolog version 7.3 and then open the Sample Projects one at a time and make the following changes. Keep in mind Version 7.3 will be opening ‘.prj’ files created by version 7.2.
(1) Try to Build the GAMegaLotto Project and ‘Add’ requested and required items suggested (in Lotto.pack):
Required items: As you can see a lot of new PFC items were built into version 7.3:
(Note: you could just click on ‘Add All’)
(2) Since a lot of new items have now been added to your project, you’ll see a few Errors and warnings.
(3) Select ‘Build All’ to force a total rebuild. This will clear all the errors and just leave warnings and the program should work as it did with Version 7.2.
(1) Try to ‘Build’ the LottoV2 Project and ‘Add’ all required items suggested:
Required items: Again, a lot of new PFC items were built into version 7.3
(Note: again you could just click on ‘Add All’)
(2) A lot of new items have now been added to your project as before, and this time you’ll see only 5 Errors; now select ‘Build All’ to force a total rebuild. This will include these items in the second Build, unfortunately this will not clear the errors - a little more work will need to be done to force visibility of the PFC ‘vpi’ that Visual Prolog 7.3 detected and suggested adding in GAMegaLotto, but not for LottoV2. The solution I chose was as follows:
(a) Open the ‘Numbers.pro’ Class Implementation file and make the following change:
open core, vpiDomains
open core, vpiDomains, vpi
(b) Save the ‘Numbers.pro’ Class Implementation file then select ‘Build’ again. Select ‘Add’ #include @"pfc\vpi\vpi.ph" when requested; which will now get it included as needed; and when finished rebuilding, the program should now work as it did with Version 7.2.