Find Jobs
Hire Freelancers

Basic Prolog program

$10-15 AUD

In Progress
Posted about 4 years ago

$10-15 AUD

Paid on delivery
I am new to start this language, there is a problem that cannot be solved. There are two buttons: button a and button b. and two lights: light p and light q. Rule: - pressing button a the light p will be on. - pressing button b will interchanges p and q. - initially, p and q are off. - goal: p and q are on. Use the Prolog language to solve this question. Only use clauses of the form like this: p(T+1) :- ... q(T+1) :- ... Using the following action names: name: press_a, meaning: press button a name: press_b, meaning: press button b the rule T+1 instantiated by 1 and T instantiated by 0, and the additional fact press_a(0). the program should mention these six atoms:p(1),p(1),p(0),p(0),press_a(0),press_b(0). The part of my code, but I am not sure if it is correct: p(T+1) :- press_a(T),not p(T). p(T+1) :- q(T), not p(T), press_b(T). q(T+1) :- not q(T), p(T), press_b(T).
Project ID: 23530620

About the project

3 proposals
Remote project
Active 4 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hi, I'm a systems engineer and I can carry out your project without problems. Could you contact me to know more details?
$45 AUD in 7 days
0.0 (0 reviews)
0.0
0.0
3 freelancers are bidding on average $47 AUD for this job
User Avatar
I can do it. Please check my profile for my previous projects. And also dont hesitate to contact me for this work
$25 AUD in 1 day
5.0 (10 reviews)
3.8
3.8
User Avatar
Hello, I use Prolog programming daily in my regular employment. I will create a Prolog solution to your posted problem. I will use SWI Prolog. A milestone payment for the full budget for this project must be deposited with this site before your offer can be accepted. Alan Idler Chief Software Architect Idleswell Software Creations
$70 AUD in 3 days
5.0 (2 reviews)
3.1
3.1

About the client

Flag of CHINA
Yancheng, China
0.0
0
Member since Jan 23, 2020

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.