联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> Python编程Python编程

日期:2020-10-01 11:26

COMPSCI 335 1 A#2.2

Assignment #2.2 – Hamming REST for Shakespearean Monkeys

Specs

The following assignment, A#2.3, will build an application that illustrates the

Shakespearean Monkeys genetic algorithm -- cf. lecture demo and the Infinite Monkey

Theorem:

https://en.wikipedia.org/wiki/Infinite_monkey_theorem

The current assignment, A#2.2, is a small preliminary step, preparing the servers and

their connections.

We use ASP.NET, but to avoid needless complexities, we use the upper open source

layer known as Carter, which features quite a few functional elements.

We set up two standalone REST Carter servers: (1) Monkeys, listening on http 8081 and

https:8082; and (2) Fitness, listening on http 8091 and https:8092. Here, the client will

be simulated by testing scripts using curl and httprepl.

With the two servers running (on localhost):

1. Client posts a target text to Fitness …/target (empty ok response)

2. Client posts a genome (candidate) text to Monkeys …/try

3. Monkeys posts the received genome text to Fitness …/assess

4. Fitness responds to Monkeys with the Hamming distance between its stored

target text and the received genome text

5. Monkeys returns this integer in his response to Client

COMPSCI 335 2 A#2.2

Note

If strings have unequal lengths, then the Hamming distance is first computed for their

minimum length, and then added with their lengths difference.

Sample

Target text:

[To be or not to be, that is the question]

Candidate genome text:

[To be~orAnoa [OBbej tVat i.Xt<eLju(s2ion]

Hamming distance: 15

Submission

Submit two files, one for each server, called: upi-fitness, and upi-monkeys, where upi is

your own upi, e.g. jbon007.

Due date: Monday 5 October, 23:00, to ADB


版权所有:编程辅导网 2018 All Rights Reserved 联系方式:QQ:99515681 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。