[thelist] selection refining application (extended)

rudy limeback r937 at interlog.com
Sat Sep 2 21:21:49 CDT 2000


> Kinda sounds like it would be some type of arithmatic
> SQL voodoo, thus the toss to you. Something like...?

hi matt

thanks for the kind words

the sql that you do
is just as good as i do
it isn't really voodoo
if you can do it too


... or something     ;o)


>where (
>    ([form.score1]/score1 + [form.score2]/score2 + [form.score3]/score3)
>=
>(3-[offset]))

hey, that's pretty good

what about using the old distance formula from high school algebra?

using the same field names you did, the "distance" from each product to
the user's choice is given by

    sqrt(  ( score1 - [form.score1] ) **2
          + ( score2 - [form.score2] ) **2
          + ( score2 - [form.score2] ) **2  )

at least, i'm pretty sure that this is the formula, it's been over thirty
years since i was in high school so the old wetware is a bit rusty
(how's that for mixing metaphors)

but i'm pretty good with search engines, so check this out --

    Two Points in a 3D Plane
    http://www.askdrmath.com/dr.math/problems/nazzal.8.3.99.html

anyhow, you wouldn't use this in a where clause (unless you want to
eliminate some really bad matches), just go ahead and select all the
products and return them in ascending order by the "distance"

sort of like a relevance number, where lowest = goodest, i.e. closest

exact matches would return zero, products that are off by only one number
in one dimension return 1, and so on

example -- if the user chooses 5,3,1 then products 4,4,1 and 3,3,1 are both
at sqrt(2) distance and should probably be regarded as equal, although one
of them has two numbers that match, which some might consider better (but
others might not because the third number is off by 2...)

you could add a level of complexity where you might allow the user to
designate one of the three dimensions as requiring an exact match in that
dimension, then your sql would have a where clause for that dimension and a
distance formula for the other two dimensions...


i hope i explained this okay....


rudy
r937.com

speaking of three dimensions, i've got this fabulous 3d tic-tac-toe game
called TicTactics (c)1990 that i think came with windows 3.0 or something,
part of the "microsoft entertainment pack" -- it's 17k (plus 15k for the
help file which you won't need) and don't tell bill but if you write me off
list i'll send it to you -- the thing i like about it is that it's simple
and fun and great for taking a quick break to clear your head before diving
back into conditional style sheets and eval functions and stuff

<tip>
and speaking of great games, here's one i turned jeff onto, he was hooked
pretty quick -- again, it's really simple and that's part of the beauty of
it --
  Clickomania
  http://www.zdnet.com/downloads/stories/info/0,,000O61,.html
it's free, and it's only 444k
</tip>







More information about the thelist mailing list