caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Re: [Caml-list] Playing Soccer with OCaml
@ 2001-11-07 16:11 Damien Doligez
  0 siblings, 0 replies; 6+ messages in thread
From: Damien Doligez @ 2001-11-07 16:11 UTC (permalink / raw)
  To: kok, sevillar; +Cc: caml-list

>From: "Rafael 'Dido' Sevilla" <sevillar@team.ph.inter.net>

>Which brings me to a somewhat related question: just how real-time is
>OCaml's runtime environment?

In short: it has pretty good latency characteristics, but no real-time
guarantees.


>  Is the garbage collection algorithm
>real-time, i.e. it uses its own thread to perform GC in parallel to
>processing or uses some other technique which guarantees that every cons
>performed has an upper bound on the amount of time it will take,
>regardless of GC?

Note that using a separate thread to perform GC in parallel does not
by itself guarantee real-time behaviour.


>  Most garbage collection algorithms I've seen are not
>real-time, in that they can potentially take an unbounded amount of time
>that depends on the number of allocated cells.

In a real-time GC system, the programmer gives a guarantee that the
program will never have more than a fixed amount (declared in advance)
of live data, and the system gives a bound on the time needed to
perform each allocation.  Note that this bound has to be quite low in
order to make the real-time guarantees meaningful.  The memory
management of Objective Caml has low latency almost all the time,
thanks to the incremental GC, but we do not give a guaranteed bound.
Going all the way to real-time behaviour would be doable (with a lot
of work), but it would incur a large overhead, which we are not ready
to impose on "normal" users (compilers and proof assistants).

That said, I have to add that the normal behaviour of Objective Caml
on modern machines should be good enough for interactive games.  But
if you try to run rocket control algorithms with O'Caml, don't blame
us if it fails.


>  For robotics and other
>real-time control and processing problems this is an important question.

That's right, but Objective Caml is mainly targetted at Unix systems,
which generally do not support real-time anyway.

-- Damien
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 6+ messages in thread
* [Caml-list] Playing Soccer with OCaml
@ 2001-10-29 17:39 Kai Kaminski
  2001-10-29 18:20 ` Alan Schmitt
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Kai Kaminski @ 2001-10-29 17:39 UTC (permalink / raw)
  To: caml-list

Hi,

I'm currently taking part in a university project, which is about
teaching robots to play soccer. My task is the path-finding module. It
is responsible for finding short paths, while considering moving
obstacles (team mates, enemy robots and the ball). I will probably use
Dijkstra or Markov Decision Processes to accomplish this. Not because
I'm a great friend of these algos (in fact I don't know nothing about
them yet) but my lecturer told me that these were suitable. Since I
fell in love with OCaml some weeks ago, I am considering implementing
the module in OCaml. First, to improve my OCaml skills, and second to
show my colleagues the power of OCaml.

(* They are all JAVA people. When I tell them about functional
   languages they think I want to go back to Turbo Pascal :(
*)

Now there are several questions for me:
- I'm new to OCaml and functional programming. I have some experience
  with C/C++, Pascal and Asm. But I don't think that this will help
  me. Do you think it is possible for a newbie to implement such
  algorithms within five or six month in reasonably quality?

- We use CORBA for communication (omniORB). How difficult is it to
  communicate with C++ modules via CORBA. As I understand it, CamlIDL
  could help me here, but I'm not sure.

- Is OCaml fast enough? We need to do all the work for 4-6 robots on
  one linux machine (Intel at ~400MHz).

- Is OCaml a good choice to implement these algorithms? A better
  choice than C++ at least? (Ok, I know: OCaml is *always* the better
  choice ;-)

- What about SunOS? This port is not a requirement, but it would be
  nice.

- Any pointers on how to implement these algos in a functional
  language?

- Are there any other algos you would recommend?

Thanks in advance,
Kai Kaminski

PS: I'm not really a cs guy, I'm more involved with mathematics.
    Therefore abstraction doesn't make me cry. On the other hand, I've
    just started my second year at university...

PPS: If you are a native speaker please correct at least a few of my
     mistakes. But please remember the 5 MB limit on my mail server ;-)
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-11-08  8:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-07 16:11 [Caml-list] Playing Soccer with OCaml Damien Doligez
  -- strict thread matches above, loose matches on Subject: below --
2001-10-29 17:39 Kai Kaminski
2001-10-29 18:20 ` Alan Schmitt
2001-10-30 12:17 ` Xavier Leroy
2001-10-31  2:01 ` Rafael 'Dido' Sevilla
2001-11-08  8:31   ` Axel Poigné

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).