Loading ...
Sorry, an error occurred while loading the content.

Problems with AIMA code QueueSearch

Expand Messages
  • inyourmind6684
    I m looking to create a test file and successor function for BFS in the AIMA code. However, in order to instantiate a BFS I have to pass in a QueueSearch. I
    Message 1 of 3 , Sep 24, 2008
    • 0 Attachment
      I'm looking to create a test file and successor function for BFS in
      the AIMA code. However, in order to instantiate a BFS I have to pass
      in a QueueSearch. I ran into the problem when trying to instantiate
      the QueueSearch. I know that QueueSearch extends the NodeExpander but
      I've tried several ways to instantiate it and I keep getting
      complaints from eclipse. Does anyone know how to create a QueueSearch
      so that eclipse doesn't complain?

      Thank you for your time.
    • Ravi Mohan
      The code for QueueSearch begins as follows public abstract class QueueSearch .... The abstract keyword implies you cannot instantiate the class. You need
      Message 2 of 3 , Sep 25, 2008
      • 0 Attachment
        The code for QueueSearch begins as follows

        "public abstract class QueueSearch .... "

        The "abstract" keyword implies you cannot instantiate the class. You
        need to instantiate one of its concrete subclasses (TreeSearch or
        GraphSearch).

        The demo and unit test classes have a dozen plus examples of how these
        may be instantiated. The readme file explains the two hierarchies of
        search and how they relate to each other.

        "> I've tried several ways to instantiate it and I keep getting
        > complaints from eclipse."

        When this happens the next time, do try to understand what the error
        message is trying to communicate. An attempt at doing this would have
        exposed the "trying to instantiate an abstract class" error.

        In other words, eclipse complains for a reason!



        --- In aima-talk@yahoogroups.com, "inyourmind6684" <dtamayo@...> wrote:
        >
        > I'm looking to create a test file and successor function for BFS in
        > the AIMA code. However, in order to instantiate a BFS I have to pass
        > in a QueueSearch. I ran into the problem when trying to instantiate
        > the QueueSearch. I know that QueueSearch extends the NodeExpander but
        > I've tried several ways to instantiate it and I keep getting
        > complaints from eclipse. Does anyone know how to create a QueueSearch
        > so that eclipse doesn't complain?
        >
        > Thank you for your time.
        >
      • kiana
        ... Do we use the AIMA code examples, i.e. BFS and QueueSearch, for the exercises in the book? Or, are we supposed to define and implement all of the code for
        Message 3 of 3 , Sep 28, 2008
        • 0 Attachment
          --- In aima-talk@yahoogroups.com, "inyourmind6684" <dtamayo@...> wrote:
          >
          > I'm looking to create a test file and successor function for BFS in
          > the AIMA code. However, in order to instantiate a BFS I have to pass
          > in a QueueSearch. I ran into the problem when trying to instantiate
          > the QueueSearch. I know that QueueSearch extends the NodeExpander but
          > I've tried several ways to instantiate it and I keep getting
          > complaints from eclipse. Does anyone know how to create a QueueSearch
          > so that eclipse doesn't complain?
          >
          > Thank you for your time.
          >
          Do we use the AIMA code examples, i.e. BFS and QueueSearch, for the
          exercises in the book? Or, are we supposed to define and implement all
          of the code for the exercises ourselves?
        Your message has been successfully submitted and would be delivered to recipients shortly.