Tarot software project

einhverfr

One of my fields of expertise is in software development. Over the last several years I have been slowly developing an engine for a tarot-reading program. The idea is that divination works because the internal and external worlds mirror eachother, so whether that mirror is a person or a computer, the issue is how well can one represent the abastract aspects of a reading such as context. Humans are far better at this key piece than computers.

So far, I have built an artifical intelligence engine that is able to mathematically represent the context of a card given a map of concepts and values. However, I have not yet managed to create an output routine that can adequately represent the meanings of the readings in English.

Anyway I am wondering what other people think about comptuer generated readings, and if this is really the main problem people see or if they see other issues as well.
 

Kahlie

The main problems in Computerised Readings from a Computer Science point of view:

Randomness
It's known that any random algorithm is not completely random. This is impossible in Computer Science. Although several algorithms exist many programs make use of easy less complex one's, so people are used to thinking: "This is not random".
You could see this clearly with randomness in Audio. (CD-players/MP3-players etc.) Worst cases included those that on "random" always started and ended with the same song...

GUI
There are many applications out there for drawing cards. Most people prefer an animated version where you can actually "draw" the Cards. (Cards can be shuffled, re-shuffled and actually selected out of a stack). Although this matters nothing for the execution of the program, people prefer this feeling of "control"...
Yet, in most cases they don't have any control. The algorithm just perceives any click on a card, as a routine to start asking for a randomised bit, so the actually click does nothing...
Unless you show 78 Cards, and put randomised bits on each of them, thereby letting the choice actually influencing the Card people get...

The main problems in Computerised Readings from a Tarot Reader points of view:

Meanings
In all programs, the meanings for each Card are limited. Usually the program features but one Meaning. This makes Readings flat, and usually very inaccurate and unhelpful.
For Example: The Tower can mean earth-shaking events, but also falling in Love, hot sexual activity, a Computer Tower etc. etc.

Connection between the Cards
A Tarot Reader should read the connection between the Cards. Each Card influences a total Reading, so the connection is very important. As well as seeing certain combinations of Cards.
A Computer Program usually does not implement this, and for implentation, would require hundreds of extra associations.

Actual Help/Personal Touch
A Tarot Reader, when seeing a Spread that gives a very negative view, will always council the Querent, either by drawing of an extra Card on how to help themselves, or by talking about seeing somebody to talk over their worries. The Tarot Reader knows how the Querent is feeling and responding to a Tarot Reading and so actually talks for a while with the Querent or refers the Querent to a certified professional.
A Computer Program does not do this, while in my opinion this is a very important and responsible part of Tarot Readings.

*Getting off the soap box*

Kahlie
 

einhverfr

Tarot project thoughts

Kahlie said:
The main problems in Computerised Readings from a Computer Science point of view:

Randomness
It's known that any random algorithm is not completely random. This is impossible in Computer Science. Although several algorithms exist many programs make use of easy less complex one's, so people are used to thinking: "This is not random".
You could see this clearly with randomness in Audio. (CD-players/MP3-players etc.) Worst cases included those that on "random" always started and ended with the same song...

Well... How random really are the cards you draw anyway? In general, in the systems I work with you have two grades of random numbers: pseudorandum numbers generated via mathematical algorythms and used for general randomizing purposes and high-grade (non-repeatible) random numbers which use environmental data as part of their generation. These latter ones are used particularly commonly in cryptography and security applications but they are slow to work with because you only have so much "randomness" you can pull out of the system at any given time.

I am not sure if Windows has true random numbers, though (the equivalent of /dev/random in UNIX). OpenBSD, FreeBSD and Linux all have very high quality random number generators which ensure that you cannot just take a few random samples and then have a pretty good idea of what the next one is likely to be.

I am currently using the low-grade numbers repeatedly to shuffle the deck more than once. Using the high-grade numbers would slow the applicationd own to a crawl especially if it were, say, running on a web server and you have concurrent queries :)

So one of the questions to be addressed is whether this is really the right way to go. Environmental state information is what really determines randomness around us, but is it necessary in this application? Is it worth the performance cost?

Kahlie said:
GUI
There are many applications out there for drawing cards. Most people prefer an animated version where you can actually "draw" the Cards. (Cards can be shuffled, re-shuffled and actually selected out of a stack). Although this matters nothing for the execution of the program, people prefer this feeling of "control"...
Yet, in most cases they don't have any control. The algorithm just perceives any click on a card, as a routine to start asking for a randomised bit, so the actually click does nothing...
Unless you show 78 Cards, and put randomised bits on each of them, thereby letting the choice actually influencing the Card people get...

Well, I normally suggest cutting the deck into three piles and then drawing the cards based on that. I will take this into consideration because the cards really are shuffled my current algorythm while quite random doesn't perform well, and I am looking at alternatives).

Now, web servers are stateless, so the best way to handle this would be to accept the card number array selected by the user, and then shuffle the deck and select the cards based on that number. Although it is possible to store the information otherwise and later retrieve it, I am not convinced that this buys anything. Using a framework like AJAX, one might have more flexibility in this regard.

Kahlie said:
The main problems in Computerised Readings from a Tarot Reader points of view:

Meanings
In all programs, the meanings for each Card are limited. Usually the program features but one Meaning. This makes Readings flat, and usually very inaccurate and unhelpful.
For Example: The Tower can mean earth-shaking events, but also falling in Love, hot sexual activity, a Computer Tower etc. etc.

I have an abstract solution to this problem. I am having trouble making the link though that allows the computer to actually communicate the context of the card.

In other words... each card can have its meanings affected by other cards in the spread. The problem is not in making this change. THe problem is allowing the computer to tell the reader about it :)

Kahlie said:
Connection between the Cards
A Tarot Reader should read the connection between the Cards. Each Card influences a total Reading, so the connection is very important. As well as seeing certain combinations of Cards.
A Computer Program usually does not implement this, and for implentation, would require hundreds of extra associations.

As I said, I have a general algorythm for this. I don't like huge databases of association. Instead I have attributes that are modified by other cards in the reading. Currently I only have a "pleasentness" factor implimented, but the hooks are there to add others (these could also be used to select between meanings, for example).

For example. If we use the Celtic Cross spread, and the card representing the past is the 10 of Cups, and the card representing the ultimate outcome is the 10 of swords, my reader will take a more pessimistic approach to reading the other cards (the actual process is more complex than that). The sysem works well enough that I don't use reversed cards (largely invented by Waite anyway).

Kahlie said:
Actual Help/Personal Touch
A Tarot Reader, when seeing a Spread that gives a very negative view, will always council the Querent, either by drawing of an extra Card on how to help themselves, or by talking about seeing somebody to talk over their worries. The Tarot Reader knows how the Querent is feeling and responding to a Tarot Reading and so actually talks for a while with the Querent or refers the Querent to a certified professional.
A Computer Program does not do this, while in my opinion this is a very important and responsible part of Tarot Readings.

My current approach is to try to build this into the actual spread interpretation. In other words, many spreads have natural points of leverage. Don't like the outcome? Focus on changing that one card in your life. For the Celtic Cross spread, this is the 9th card (B'riah/hopes and fears), though the 7th card (Assiah) works too (though not as well-- it makes a nice secondary handle).

Also, I find it helpful to emphasize that even apparently temporally oriented spreads like the Celtic Cross are really snapshots of the moment and that with a bit of work, things can change and no outcome is set in stone.

Maybe an additional help section would be nice as well "What you can do to change your things if you don't like the outcome."
 

Kahlie

einhverfr said:
I have an abstract solution to this problem. I am having trouble making the link though that allows the computer to actually communicate the context of the card.

In other words... each card can have its meanings affected by other cards in the spread. The problem is not in making this change. THe problem is allowing the computer to tell the reader about it :)

As I said, I have a general algorythm for this. I don't like huge databases of association. Instead I have attributes that are modified by other cards in the reading. Currently I only have a "pleasentness" factor implimented, but the hooks are there to add others (these could also be used to select between meanings, for example).

For example. If we use the Celtic Cross spread, and the card representing the past is the 10 of Cups, and the card representing the ultimate outcome is the 10 of swords, my reader will take a more pessimistic approach to reading the other cards (the actual process is more complex than that). The sysem works well enough that I don't use reversed cards (largely invented by Waite anyway).

That's the thing.. There are NO negative and NO positive Cards in my opinion. The 10 of Cups can be immensively negative, the Happy Family with one left out, or the person not feeling they fit in and so not allowing their own individuality to grow.
The 10 of Swords can be very positive, finally ending a painful situation and moving onwards to something better at a higher level. It isn't called Rebirth for nothing in some Decks.
All Cards have positive and negative shades in them.

Card Meanings are dependent on the Question. Card Meaning are dependent on surrounding Cards. Card Meanings are dependent on what intuitive leaps the Reader makes. And in some cases, what clairvoyant flashes the Reader gets.

Even with a general algorithm based on the card meanings, and adjusting them, I still highly doubt it can give quality Readings. Especially based on the time of coding that is involved...

Kahlie
 

jmd

Though I tend to agree with Kahlie's several points, I would like to further encourage the development of alternative software for computer-generated readings.

At this stage, I have only seen and checked (and that rather rarely) a few options. Some of these were for Motorola '040 chipped Apples (quite old now - pre-PowerPC days), and then there's of course the online programme at tarot.com, with the very well written intepretative materials by Christine Payne-Towler.

In an actual reading, I would suggest that many of us do not have a 'fixed' meaning with regards to either card or position within a predetermined spread (and that even this latter may be altered as one sees fit in the moment of reading). Also, for many, I would suggest that the human interaction with the readee plays a significant role.

Nonetheless, there is no reason that another programme cannot be developed with its own particular strengths.

What I would personally like to see is a programme that allows for the following user-defined capabilities:
  • the deck used (thus enabling addition and REMOVAL of images);
  • reversal switch on/off;
  • number of cards in a reading (1 - 78);
  • positioning of these (ie, determining where they are located on a screen - for example, in an arc, cross, etc.);
  • shuffling duration - duration defined by either MouseOver/On or MouseDown, where duration is also in fact linked to looped command for randomness;
  • Cutting and positioning of post-shuffled deck into either a) definable number of piles (1 - 78?), or b) fan (fans? 2 - 39?);
  • position general meaning editable field;
  • card general meaning editable field; and
  • report generating capabilities (to be able to print, view online (html), or save as rtfd/pdf (the rtfd allows for image inclusion, for those unfamiliar with the format).
This does not mean that there cannot already be a few pre-programmed suggestions (Celtic Cross, 3-Card, 7-Card horseshoe, etc), but rather that each of these needs to also be able to be editable by the user.

In other words, a programme that does not reflect the particular Tarot views of the programmer (with which I am very likely to personnally disagree with in some points in any case), but really allows for a user to use it as a tool.

This, incidentally, is what is nowadays more or less expected from some of the top software for astrology, though there of course the peculiarities of the field are distinct.

...oh! one more thing! needs to be able to work on OS X! Actually, if this works, it would likely have been written for OS X :D
 

einhverfr

Kahlie said:
That's the thing.. There are NO negative and NO positive Cards in my opinion. The 10 of Cups can be immensively negative, the Happy Family with one left out, or the person not feeling they fit in and so not allowing their own individuality to grow.
The 10 of Swords can be very positive, finally ending a painful situation and moving onwards to something better at a higher level. It isn't called Rebirth for nothing in some Decks.
All Cards have positive and negative shades in them.

Card Meanings are dependent on the Question. Card Meaning are dependent on surrounding Cards. Card Meanings are dependent on what intuitive leaps the Reader makes. And in some cases, what clairvoyant flashes the Reader gets.

Even with a general algorithm based on the card meanings, and adjusting them, I still highly doubt it can give quality Readings. Especially based on the time of coding that is involved...

Kahlie

Note that at least in my proof of concept, that that if you put the 10 of swords in the place representing the past and the 10 of cups in the place representing the future, the preading is quite optimistic.

Note that these are extreme examples, and oversimplistic. It is possible for any card to become positive or negative based on what the surrounding or influencing cards. Other cards, such as the wheel of fortune, may present very little in terms of pleasentness or otherwise to a trend but may amplify whatever else is going on.

The actual method of determining context is actually fairly complex. It is based on two things:
1) Trand analysis and
2) Influence analysis.

Trend analysis sees a combination of cards as a vector from one card to another, influencing at least one more card. Influence analysis sees two cards presenting a combined force on at least one more card... At the end each card has a numerical value of its "pleasentness" which is used to determine the final meaning.

Pleasentness is mostly being used as a test attribute. More attributes can be added later. This would allow cards to shift meanings depending on other cards in other places in the spread.
 

einhverfr

Replying to JMD's points

First, the basic engine is quite simple. I am not sure how easy it would be for an average *user* to create the context information about the places. But the actual spreads can easily be expanded by writing a few data files. These files include position layouts, context maps, and general position descriptions. In these areas, the context maps are the most important because without them the AI engine can't properly interpret the context of a card within the reading.

Secondly, in terms of "fixed meanings" I disagree. It is just that the fixed meanings are sufficiently abstract to require that we change the aspect of them that we discuss with the querant. I.e. there is a principle at the heart of every card and every position.

Thirdly, I think that a really high-quality product would be as much a learning tool as a divination tool. This means that the placements might need to be described in detail as well as the general model that they fit into. It *might* be possible to choose aspects of a placement's meaning based on attributes in a card, for example, but I have not tested this.

As for adding/removing images, this is consistant with my design. Making the descriptions of the cards editable is likely to be much more difficult (in part because I haven't figured out how to print the descriptions as modified by the context yet-- I know the context. I just don't know how to interpret it in natural language). This has been the hardest problem I have faced yet in this area.

Again, I suppose it depends on who the user is :-(

More thoughts on random numbers:

Pseudorandom numbers are likely to be problematic because they are deterministic. That is, with the same seed value, the same sequence of random numbers are obtained. There are two classes of high quality "random" numbers. The first is still pseudorandom and involves advanced algorythms (like in the GSL for example). The second are what we call "true" random numbers and are much more along the line of a physical process. These second ones are truly nondeterministic. The problem (and why they are seldomly used) is that you are highly limited in terms of how fast you can generate them (no, a faster CPU doesn't help). These "true" random numbers are generated based on "entropy" generated in peripheral equipment or drivers. In essence these are much more akin to slight variations in how your hand moves when you roll dice or shuffle cards than the deterministic process that most pseudorandom numbers use.

So while I currently do a good job at simulating nondeterminism, the truth is that it is deterministic. I will have to think about this further and decide whether this is worth trying to fix (maybe by periodically reseeding the pseudorandom number generator with true random numbers).
 

jmd

I suppose that einhverfr did say in the opening part of the problem is to 'represent the context of a card given a map of concepts and values', and that, essentially, is where I personally agree with Kahlie is that the mapping itself presupposes particular values - hence my suggestion to create the software with the result being editable - and easily so from an end-user perspective.

I also appreciate that this is not necessarily an easy task.

But let us take the two cards mentioned on a number of occasions in this thread as illustrating the problem at hand.

Even stating optimism when having the ten swords in the past position and the ten cups in the future, or pessimism when these are swapped, hints at particular views of these cards - and furthermore these as more or less standardly depicted on WCS-style decks.

These 'meanings and values' are certainly not necessarily the case (and for some of us far from the case) when considering the imagery as standardly presented in various Marseille-style decks.

For the software to work in the manner intended, a number of factors would thus have to be the case: a relative positive-negative weighing of each card, and these relative to an also relative weighing of position for each card. These, as illustrated by Kahlie, are however so dependent on context as to make the exercise either mere reflection of quite fixed views of card meaning and card-position, or alternatively so complex as to render the project (at least to my understanding) so complex that something simpler and alterable by the user would be more desirable.

So, to return to the end question of the opening post, the main problem I see with computer generated readings is that it gives the user no ownership of the reading. I would suspect that a really useful programme would assist Tarot readers - and as such needs to be able to be managed by them, and assume only little computer knowledge.
 

Kahlie

einhverfr said:
First Quote
For example. If we use the Celtic Cross spread, and the card representing the past is the 10 of Cups, and the card representing the ultimate outcome is the 10 of swords, my reader will take a more pessimistic approach to reading the other cards (the actual process is more complex than that). The sysem works well enough that I don't use reversed cards (largely invented by Waite anyway).
einhverfr said:
Second Quote
Note that at least in my proof of concept, that that if you put the 10 of swords in the place representing the past and the 10 of cups in the place representing the future, the preading is quite optimistic.

Actually, you gave the opposite example first. 10 of Cups in the Past, 10 of Swords in the future. Now we have two examples, positive to negative, and negative to positive by your standards. I do not agree with that ;) See back to my older post about Negative/Positive Shades in all the Cards.

I know that you are giving simplistic examples for the sake of discussion =)
I also know that it's hard to determine if a Card is seen in a more negative or a more positive shade. As said before, this depends on many things, it's hard to code that in. It doesn't only depend on surrounding Cards! (Although coding in the elemental dignitaries system would be easy)

Also, Questions are relevant to Card Meanings.

Example:
"How will my job interview go Tomorrow?"
Cards: Ace of Disks, Ace of Cups, The Lovers
Answer: You have an opportunity to make this chance grow into a job offer, provided that you use the energy available. Work on being and look sympathetic and good for the company, a real team worker, and realise that there are other applicants as well. There is no perfect job, choices always have to be made. Make sure you pick to commit to that what is worthwhile to you.
Here, the Ace of Disks stands for the growing opportunity, the Ace of Cups for the loving, emotional opportunity (team-work) and the Lovers for choices and commitment.

Example:
"How will my date go Tomorrow?"
Cards: The Same.
Answer: You have an opportunity to ground your relationship, making it flower, the time is right for some romance. Love is in the Air.
Here, the Ace of Disks stand for Grounding, the Ace of Cups + The Lovers for the Love potential.

This combining of Cards to make it into a story and fitting it to a Question is really too much for computer Programs. And these were just 1 interpretation of these Cards. I could have written many different ones, especially because I didn't pick a deck. Art is rather important in Card Meanings to me. I only made Examples, Cards were never actually drawn for Querents.

Yes, I do feel that Computerised Readings have a place in this world. And I hope you don't think I'm sinking your boat =) Or just being overly annoying. Yes, I also worked with Turing Machines and did some minor work in AI. (Actually, I like it a lot). Personally, for me, it would be too much work to approach something that is reasonably close to what it should do. (Be a Tarot Reader)

However, it would be much easier and probably much more appriciated to make it into a Tarot Tool. One that gives meanings, and then people can easily write their own impressions with the Cards, and then print their Readings out for themselves.
This Tool would be of course for Tarot Readers themselves. Because we are the type to wish to change Spreads, Cards etc. It could feature a lot of options that are very easily likable, and you would make a lot of people happy with your work.

One of the options I would always like to see is the drawing of double Cards being allowed. When Reading for Clients in Big Spreads (15+ Cards), often, I read with 2 or 3 Decks. Each Deck standing for a seperate part of the Reading. (Head/Heart for example) The appearance of double Cards gives pause to think, and absorb that message even more. Although, sometimes the same Card, gives quite a different Meaning.
In this, a Computer Program would be much more handy, because they can give the option of doing this.

So, personally, for a Tarot Tool, I would focus on original ideas in which a Computer Program is better, then a hand shuffled Deck. Although I don't believe that a Computer Program would ever be better then a Reader.

Kahlie
 

reagun ban

I think, if no one minds, I'll listen to the advice given here and apply it to my own software, where possible.

jmd said:
the deck used (thus enabling addition and REMOVAL of images)
I'll be taking this on board.
jmd said:
reversal switch on/off
What, you mean so that cards will/won't be inverted?
jmd said:
number of cards in a reading (1 - 78)
I found that you're limited in screen size, where in reality you have a whole table to deal with, such that you either have really tiny cards, really busy spreads with cards overlapping, or a limit to the number of cards you can place comfortably.
I didn't place any such limit, but left it to the spread designer's better judgement.
jmd said:
shuffling duration - duration defined by either MouseOver/On or MouseDown, where duration is also in fact linked to looped command for randomness
Do you meant threaded here, I'm dyslexic so I have to be pedantic or I can't gaurantee I'm understanding.
jmd said:
Cutting and positioning of post-shuffled deck into either a) definable number of piles (1 - 78?), or b) fan (fans? 2 - 39?)
I'll be implementing this at a later stage. I'm not paticularly happy with the limits I have at the moment, but the joys of OO is you can build in a modular way.
jmd said:
report generating capabilities (to be able to print, view online (html), or save as rtfd/pdf (the rtfd allows for image inclusion, for those unfamiliar with the format).
I'm learning both PHP's libraries for pdf and Java's (for struts based architecture, of course). This occured to me some time ago. The format I have at present is utterly unprintable because of the way my code works, but I've been meaning (for some time) to add a "printer friendly" button.

jmd said:
In other words, a programme that does not reflect the particular Tarot views of the programmer (with which I am very likely to personnally disagree with in some points in any case), but really allows for a user to use it as a tool.
That's the aim of my next tarot related programming project. A completely digital cyber deck, that can be used to give real time readings or just played with.

jmd said:
...oh! one more thing! needs to be able to work on OS X! Actually, if this works, it would likely have been written for OS X :D
Mine's browser based, it even works on explorer, I'm told.
I use either OS X on the desktops or some linux variant (I was sick of viruses) on the laptop.