THERE were two videos of Boris Johnson that went viral this week. In one, he wandered along a corridor, talking about how he picks up after his dog and takes milk in his tea. In the other, he urged people to vote for Jeremy Corbyn.

Both videos were frankly ridiculous, but only one was real. Believe it or not, the first video was an advert for the Conservative Party. The second video was created by artificial intelligence as an illustration of how powerful “deepfake” technology has become.

The research group behind the fake video also produced an equivalent one where Jeremy Corbyn endorsed his rival.

In an election dominated by Brexit these videos provided some light relief, but the questions they raise are very serious indeed – because the power of the artificial intelligence which is used to create such lifelike fakes could be used in all sorts of ways.

READ MORE: Alison Johnstone: Delayed discharge issue needs joined-up thinking

Increasingly, when we go about our daily lives, we are interacting with machines instead of people. We buy our groceries from automated checkouts, our mobile phone acts increasingly as a personal assistant.

As they get more sophisticated, algorithms are able to make more decisions for us, freeing up our time to concentrate on what is important to us.

But the increasing power of the algorithms behind automation comes with great responsibility.

The area is so far largely unregulated. We can’t let it become a wild west of AI networks.

The vast majority of people working in this sector are still male, but the default persona of many virtual assistants is a subservient female. That rings some alarm bells for me.

But what is obvious from the fake videos in the election is how much AI algorithms could undermine our democracy and our rights.

In the wake of the #MeToo movement, AI reporting tools were developed to support women to come forward, but such technology could also be used for much darker purposes such as revenge porn or other forms of harassment.

If artificial intelligence can so effectively act as an impressionist of well-known figures, how can we trust what we are watching online?

We are already in an era of fake news. Doctored videos are being used in politics. The Tories published a video which was edited to show Labour MP Keir Starmer looking lost for words when discussing his party’s Brexit policy. It was mischievous and misleading. A similarly re-edited video was shared to make the SNP’s Ian Blackford look flustered when being questioned on health. It was even shared by the journalist Andrew Neil.

READ MORE: Tories 'doctored' clip of Keir Starmer on Good Morning Britain

In these examples, one party is manufacturing the silence of their opponents on the issues they choose. It’s a worrying precedent. It used to be that unscrupulous politicians might “dig the dirt” on their opponents when a campaign got nasty. Now they don’t have to, they can simply doctor videos of them to say whatever they want.

With artificial intelligence added into the mix, where will this fakery stop? In California and Texas, they have rushed through legislation to make it illegal to produce a malevolent deepfake of a politician in an election campaign.

The scandal surrounding Facebook and Cambridge Analytica should have been a warning sign about this. How many people have taken action since to make sure their data isn’t being used for political ends? How many people have protected their photographs on social media to stop them being taken and used elsewhere?

Cambridge Analytica showed how artificial intelligence and data can be used to swing elections, but in the UK we appear not to have learned our lesson. This General Election still feels like the wild west when it comes to political messaging.

That is dangerous because there is an existential crisis hanging over this election which is being ignored. It is the first General Election since UN scientists laid out what would happen if we do not reverse global warming in a decade. At three degrees warmer, they said, we will lose 67% of insect species and 41% of mammal species on Earth.

READ MORE: It’s time for Scotland to become an independent country in the EU

We’re electing MPs who could sit in Westminster for half of that decade, yet every party is proposing business as usual when it comes to our biggest contributions to emissions like fossil fuels and transport.

Whichever MPs Scotland sends to Westminster, they have a huge burden of responsibility to take this seriously. Yet the debate to get them elected has no depth and few challenges.

The BBC and STV have told the Scottish Greens that we have not been invited to take part in their TV debates. This means there will only be one pro-independence party at the debate and none that will demand climate action.

Internet fakery is obscuring the stakes of this election, so we need our broadcasters to step up.