Programming In Prolog Part 2 - Syntax, Questions and Structs

Поділитися
Вставка
  • Опубліковано 9 лис 2024

КОМЕНТАРІ • 58

  • @marko4124
    @marko4124 7 років тому +51

    just for the record:
    when you type weather(City,_, warm) @ 3:04 and press ENTER, SWI-Prolog only prints City = la. City = phoenix won't be printed until you press SPACE.

    • @marko4124
      @marko4124 7 років тому +6

      you can also type semicolon instead of SPACE

    • @nykout
      @nykout 6 років тому +2

      Thank you, was wondering why that doesn't work.

    • @HassaanRaza
      @HassaanRaza 5 років тому +2

      thanks for the comment man! it should have been explained in the video.

    • @giancarco
      @giancarco 4 роки тому

      Thank you so much. I Spent one hour figuring what was wrong. Thank you!

    • @wasit-shafi
      @wasit-shafi 4 роки тому

      we can also use tab instead of spacebar

  • @joseluislopes3956
    @joseluislopes3956 8 років тому +36

    I got a little confused on the last part, why is that we put both days, monday and wednesday on both courses, if on monday is in one building and on wednesday is on the other? If I was for the building of cse110 on monday wouldnt it tell me both buildings?

  • @AndreaNing-gh3sg
    @AndreaNing-gh3sg 5 місяців тому

    Thank you for the simple, clear and good teaching

  • @richardhodson1765
    @richardhodson1765 9 років тому +12

    Given that each struct has day( Monday, Wednesday ). If I ask the question, where is my CSE110 class on monday? it would appear it would give 2 answers: COOR115; COOR321.

  • @TheGodWaffle
    @TheGodWaffle 9 років тому +50

    Shouldn't the first struct exclude wed since that room number doesn't apply to it? Same with the second and mon.

    • @brendanwilson1505
      @brendanwilson1505 6 років тому +3

      Yeah, I was thinking the same thing. Great video though.

    • @xavierj186
      @xavierj186 5 років тому

      I'm thinking its done that way due to how the struct is constructed but i couldn't say it for certain.

  • @stonebrother3751
    @stonebrother3751 6 років тому +3

    8:16 in the summer LOL
    Thank you so much for these videos

  • @HassaanRaza
    @HassaanRaza 5 років тому +1

    when you type weather(City,_, warm) @ 3:04 and press ENTER, SWI-Prolog only prints City = la. City = phoenix won't be printed until you press SPACE (or semi-colon).

    • @naamanalawala6628
      @naamanalawala6628 5 років тому

      It is because when you have more than one outputs for a single query, it will keep asking you whether the first is correct answer, or you need all other outputs. semi-colon is for OR operator

  • @lancejohnson3278
    @lancejohnson3278 9 років тому

    Glad I am starting this after you already have these great tutorials up!

  • @wasit-shafi
    @wasit-shafi 4 роки тому +1

    1) do we something like else so to write(X is not warmer than Y');
    2) can't we use "coor105;coor321" in struct to represent or amoung buildings instead of creating another struct for that...

  • @reviews418
    @reviews418 3 роки тому

    quick question regarding the last example with structs, where you put day, time, professor. shouldn't they be in capitals to declare them as variables? thank you

  • @IvoirRienna
    @IvoirRienna 9 років тому +3

    Thanks for the videos, really helpful!!
    Sooooo, what kinds of job would I get if I'm really good at prolog programing...?

    • @TheSimpleEngineer
      @TheSimpleEngineer  9 років тому +1

      Ivoire Rienna Prolog is a fundamental language for programming in Artificial Intelligence. Many careers begin upwards of 70k-80k depending on your location and even more. It's a dialect of common LISP and is a very popular language still used today. Although, it may not be directly "Prolog", research LISP.

    • @IvoirRienna
      @IvoirRienna 9 років тому

      Oh I see. Thank you for answering my question and thank you for taking the time to upload these videos. Really helped me in my 'Info Infrastructure Protection' class that I am taking right now.
      Reallym thanks a BUNCH!

    • @AndriiMuliar
      @AndriiMuliar 9 років тому +15

      +The Simple Engineer This is not a dialect of LISP. Prolog is not related to functional language LISP because it is not functional at all. Prolog has emerged from pure mathematics in partucular from first order logic (Horn Clauses).

  • @djiniel
    @djiniel 9 років тому +2

    can we also stuck the building into building(105,321).

  • @AbdulHadi-gn4jm
    @AbdulHadi-gn4jm 9 років тому

    thank you sir....i'm very impressed your teaching style..and i also like music which is play at beginning of the lacture...first time i learn the prolog now i seems like a programmer.....thansk a lot sir...

  • @Yazan_Majdalawi
    @Yazan_Majdalawi Рік тому

    In the struct example, I don't understand why didn't we add building(coor105, coor321)
    instead of the other block you added, seems I did not understand structs from this video :(

  • @aseilymlee2525
    @aseilymlee2525 9 років тому

    I like your site so much,,, it is really good. It help me a lot at school.

  • @cxzm3395
    @cxzm3395 8 років тому

    Can I see the full code somewhere? Like the white background window? Thanks for the videos, btw. My teacher recommended these as supplements for our prolog assignment.

  • @richarderwin4998
    @richarderwin4998 9 років тому

    Thanks for this! Very helpful.

  • @ahsanalikhan5704
    @ahsanalikhan5704 4 роки тому

    Sir Can You code davis putnam SAT procedure code please

  • @brahimessakhi174
    @brahimessakhi174 9 років тому

    Thanks my friend. It is really interesting. many thanks to you.

  • @yasminebencheqroun5419
    @yasminebencheqroun5419 7 років тому

    Hello!!
    Thanks so much for the video, I really find your tutorial helpful in understanding the fundamentals of Prolog (I'm still a beginner).
    I just had a question about the structs if you don't mind? So looking at the two structs you made after you did it all made sense but how come there was a difference in formatting some of the attributes of the course? The way my brain is seeing it is to write it all as name(cse110), time(11,12), day(mon, wed), prof(holton, bryce), place(coor105) but you only wrote cse110 and coor105... Basically what I'm asking is why didn't you have the name of the course or the location of the course written in the same format as time, day or prof?
    Thanks again :)

  • @mexico9500
    @mexico9500 8 років тому

    subbed, great vids so far!

  • @hemjoshi7619
    @hemjoshi7619 8 років тому +1

    Omg, these videos are so interesting, would you please please upload more videos on prolog? :)

  • @manideeprazz
    @manideeprazz 9 років тому +1

    Hello, How to run a query based on the last rule/fact i.e. course?
    brief a example pls .
    Thnx

  • @DrTube893
    @DrTube893 9 років тому

    Thanks dude, cheers

  • @fernandoavalos4556
    @fernandoavalos4556 9 років тому

    Coor building and holton bryce? Did you go to ASU?

  • @АндрійДобрянський-о4в

    Thanks a lot.

  • @Manuel-oe4gv
    @Manuel-oe4gv 9 років тому

    Thank you guy

  • @csipaiandreea3044
    @csipaiandreea3044 8 років тому

    Hello :) I have one question :D How to program with backtracking and cut in Prolog?

  • @CherryPauper
    @CherryPauper 9 років тому

    How do you run it? The program with the warmer_than function?

  • @sneh9817
    @sneh9817 5 років тому

    Intro song?

  • @Joshuaposada
    @Joshuaposada 9 років тому +3

    Is Bryce suffering from some sort of entanglement?

  • @shubhampandey3166
    @shubhampandey3166 8 років тому

    what will be the output if we write warmer_than(la, phoenix) .... is it la??

    • @marko4124
      @marko4124 7 років тому +1

      there won't be any output, except for 'false'.

  • @Anup4814
    @Anup4814 6 років тому

    Why does it show only the name of one city though it has got two cities with Temp as warm ? screen.w3.ua/Apr18/10830915.jpg

  • @lemiaabdalraheem2647
    @lemiaabdalraheem2647 10 років тому

    Thanx so much ^_^

  • @joeisnotimpressed1506
    @joeisnotimpressed1506 7 років тому

    whats the name of the intro song ?

  • @lover0night111
    @lover0night111 9 років тому

    What's the name of intro song ? :O

    • @lover0night111
      @lover0night111 9 років тому

      ***** thanks

    • @d35t1201
      @d35t1201 7 років тому

      I need the answer! its not displayed here :(

  • @dimitrivasilev2905
    @dimitrivasilev2905 9 років тому +3

    Im getting false for weather(City, summer, hot), weather(City, winter, warm). for some reason. (4:30) I have written the same rules that you have. Also, for weather(City, _, warm), compiler only prints City = la.

    • @HelloIamRachnaGupta
      @HelloIamRachnaGupta 8 років тому +1

      same for me too. For output only la is shown.

    • @ijrogu
      @ijrogu 8 років тому +1

      When you query weather(City,_,warm), the first object for which the query is true is returned. I thought that the comma would give the next true statement, but for me 'r' (which is syntax for redo) returned the next true statement, phoenix

    • @Anup4814
      @Anup4814 6 років тому

      Yeah! Thank you @Ugorji.. I got it now. screen.w3.ua/Apr18/11110001.jpg

  • @PowerAndP-g3v
    @PowerAndP-g3v 8 років тому

    BUT its doesnt show any message like witch city is warmer that the other you just jumped it