Re: How to: referencing variables using the contents of otehr variables.



On Apr 15, 1:33 pm, Joshua Cranmer <Pidgeo...@xxxxxxxxxxxxxxx> wrote:
fguy...@xxxxxxxxx wrote:
Just keeping track of the move sequence in a game is one thing, but
when it comes down to analysing a  few moves deep. You end up
comparing and evaluating many thousands of positions each with their
own set of pieces. so if a piece is an object, if you don't do it
right the overhead associated with keeping track of all these objects
is tremendous.

You're essentially balking because you think it won't be fast. You don't
have proof of where the slowdown is, and I don't think you're skilled
enough to guess: I sure as hell am not sufficiently skilled to be
reasonably accurate.

I am willing to bet, however, that the speed differences in your
representation here is going to be dwarfed by algorithmic choices.
Probably, the overhead would be less than the noise threshold. At the
very least, before you complain, show us proof that the overhead is
where your bottleneck.

--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth

Not at all. The particular comment you quoted referred to a suggestion
simply that a piece should be an object. I wasn't balking at anyone's
suggestion because it would be slow. But I have tried a number of
methods, including some that use pieces as objects. There are a few
different ways to skin a cat with regards to pieces as objects, I've
even tried a few. Some methods work better than others. In fact I have
learned that choices on data structure can have a very significant
impact on overall speed.

But with regards to enums in particular, That did go a little beyond
the reason for my original question. I'll probably end up giving enums
or polymorphism a try, just not quite yet. I want to get the most out
of my current data structure before I try a different one.

If you're familiar with FEN notation, all information about a chess
position is described by the characteristics of a position, once a
move is completed, the history of what a piece has been doing is
mostly irrelevant.


regards.
.



Relevant Pages

  • Re: slow file transfer speeds on SBS
    ... There is some overhead with windows as it sets up for the copy so 15 seconds ... Given the overhead created by windows and the performance expectiations of ... >> Regards, ...
    (microsoft.public.windows.server.sbs)
  • Re: Fastcode AES
    ... starting to benchmark. ... I will try to reduce overhead for the Encrypt/Decrypt ... Best regards ...
    (borland.public.delphi.language.basm)
  • Re: urgent ......problems on group
    ... would suggest you change your data structure such that all your data is ... > what I'm trying to do is to get total quantity group by ... > best regards ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Fastcode Int64Div B&V 3.4.1
    ... to amortize the overhead of the loop code. ... Best regards ...
    (borland.public.delphi.language.basm)
  • Re: Matrix storage structure
    ... Any sparse-matrix data structure will come with two penalties: ... memory overhead when storing the elements that are there. ... you have only, say, a 20x20 half-full array, even of 64-bit values, ...
    (microsoft.public.dotnet.languages.csharp)