[Haskell-cafe] Testing a collision detection system

Ivan Perez ivanperezdominguez at gmail.com
Mon Jul 30 00:02:39 UTC 2018


Definitely worth a try.

It seems like a large test space.

My expectation, based on what I've seen when we applied QuickCheck to
haskanoid, would be that, with the standard generators, QuickCheck may be
good at detecting things that will not normally happen in realistic
simulations, but you may have to tune the generators to look for the more
interesting cases you want to test, and that'll be similar-ish to writing
your own test cases.

But I'd love to be proven wrong! :)

Ivan

On 29 July 2018 at 17:44, Brody Berg <brodyberg at gmail.com> wrote:

> And you've already ruled out QuickCheck and friends?
>
> On Sun, Jul 29, 2018 at 2:08 AM, <mpevnev at gmail.com> wrote:
>
>> As a part of a project, I write a collision detection system. It is in
>> dire need of testing, but designing and writing tests for all possible
>> pairs of types of colliding geometry would be a pretty big effort - not
>> only I would have to calculate the fact of collision manually for
>> 20-something pairs of types of colliding geometry, I would also have to
>> do so multiple times for each pair, since each pair requires several
>> test cases.
>>
>> So the idea is to use an existing collision detection library to
>> generate (a lot of) test cases from random data. I've found two such
>> libraries for Haskell - HODE and Bullet. The problem is, Bullet bindings
>> aren't documented at all, and HODE (which isn't really documented
>> either, but at least lists available functions) is extremely ugly with
>> IO all over the place, and manual tracking of objects' lifetimes (at
>> least that's what I infer from `create :: World -> IO Body` and
>> `destroyBody :: Body -> IO ()`, because again - no documentation).
>>
>> So my question is: does anyone know a library I could use? I'll pretty
>> much settle for whatever.
>>
>> --
>> Michail.
>> _______________________________________________
>> Haskell-Cafe mailing list
>> To (un)subscribe, modify options or view archives go to:
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>> Only members subscribed via the mailman list are allowed to post.
>
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20180729/14a44fe6/attachment.html>


More information about the Haskell-Cafe mailing list